Lucast is not good idea to make the Wicket application and spring bean
directly (can't remember why, but look for it into the archive), instead the
use of the CompenentInstantiaionListener is the recommended with the
companion of the wicket @SpringBean annotation.



On Thu, Apr 28, 2011 at 8:31 AM, lucast [via Apache Wicket] <
ml-node+3480723-1382859170-65...@n4.nabble.com> wrote:

> Thank you Mzemeck,
> I am using Spring and I tried implementing @Async but for some reason when
> I fired up my wicket app it complained that it couldn't find the beans.
> I think it must have been because I'm declaring all of my spring managed
> beans (including my wicketApplication class) on my applicationContext file.
>
> Looking at the Task Execution and 
> Scheduling<http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/htmlsingle/spring-framework-reference.html#scheduling>
> section of the spring reference manual, I decided to use a 
> TaskExecutor<http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/htmlsingle/spring-framework-reference.html#scheduling-task-executor-usage>
>  instead
> of using @Async annotations and it works perfectly with my current spring
> settings.
>
> I am autowiring spring beans on my WicketAppliation class. And I noticed
>  that calling WicketApplication.get() from the taskExecutor kept throwing a
> "WicketRuntimeException: There is no application attached to current thread
> taskExecutor-1" exception.
> I realised that I didn't need to call my db services from the taskExecutor
> since none of those tasks are time consuming, the sending emails is what is
> time consuming and that's what I limited the functionality of taskExecutor
> to.
>
> Thanks, once more for your help.
> Lucas
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Continue-navigating-while-on-submit-button-process-stuff-on-the-background-tp3473026p3480723.html
>  To start a new topic under Apache Wicket, email
> ml-node+1842946-398011874-65...@n4.nabble.com
> To unsubscribe from Apache Wicket, click 
> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>



-- 

JC
--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Continue-navigating-while-on-submit-button-process-stuff-on-the-background-tp3473026p3486071.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to