More details:
When I run my large process in a thread, the thread that is rendering the next 
page, and the large process, are getting generally equal slices of processing 
time and end at about the same time. The page I am navigating too also has 
heavy work to do in order to spin up data I need.

On 2016-05-27 12:51, Jered Myers <> wrote: 
> I have a large background process that I need to execute when a user submits 
> a form. The background process can run while the user continues to use the 
> application. I am having trouble allowing the user to continue working. How 
> do I run this background process and allow the form submit to finish and let 
> the user move on. I have tried using Threads and Futures. Here is example of 
> a login page type of submit:> 
> protected void onSubmit() > 
> {> 
>     if (!authenticateUser(user)) > 
>     {> 
>       error(%u201CInvalid username or password%u201D);> 
>       return;> 
>     }> 
>     > 
>     if (user.requiresLargeProcess()) > 
>     {> 
>       Thread largeProcess = new Thread(new LargeProcessRunnable());> 
>       largeProcess.start();> 
>     }> 
>       continueToOriginalDestination();> 
>     setResponsePage(Application.get().getHomePage());> 
> }> 
> This example is simplified for clarity. In reality, the process is in a class 
> that does not have access to Wicket code. This means I cannot do tricks like 
> use an AbstractDefaultAjaxBehavior to make the call later. Can somebody 
> please point me in the right direction? I think I am needing to spawn a 
> thread that runs outside of the Wicket RequestCycle, but I am not sure that 
> is the correct terminology.> 
> Thanks for any help,> 
> Jered>  

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to