You could use Spring 3's @Async:
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/scheduling.html#scheduling-annotation-support-async

If you can upgrade to 3.0, that is..


On Thu, May 20, 2010 at 5:17 PM, Alex Objelean <alex.objel...@gmail.com>wrote:

>
> I do not agree...
> Maybe you didn't understand completely the use-case:
>
> public class MyPage extends Page {
>  @SpringBean
>  private MyService service;
>  //perform a polling of long running process triggered by a button click
>  onClickButton() {
>    new Thread() {
>      run() {
>        service.executeLongRunningProcess();
>      }
>    }.start();
>  }
> }
>
> The following example won't work well if the Application is not stored in
> InheritableThreadLocal. The reason why it doesn't work, as I understand
> that, is because @SpringBean lookup depends on Application instance which
> is
> not accessible from within the thread. Having it stored inside of ITL would
> solve the problem.
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/vote-Release-Wicket-1-4-9-tp2222388p2225232.html
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>

Reply via email to