if you keep working on the same page instance it is kept in http sessison and is not serialized. when you go to a new page it pushes the old instance out, forcing serialization, and setting the transient field to null.
a proper way to do this would be to have an application-wide task manager. the code may look something like this: BackgroundTask bt=Application.get().getTaskManager().start(new runnable(){}); taskId=bt.getId(); <== task id is a simple string that you can pass around, usually a UUID then later when you want to poll status BackgroundTask bt=Application.get().getTaskManager().get(taskid); bt.getFuture()..... -igor On Tue, Feb 2, 2010 at 7:25 PM, Lina Thomas <ltho...@taxcient.com> wrote: > Hi > > I have a Page on which I am have to execute a long running task when > a form is submitted. This is what I do > > > 1. I have a transient FutureTask member variable in the page > 2. On submit of the form i create a callable and instantiate > the FutureTask > 3. I start the AbstractAjaxTimerBehaviour which keeps checking if > the FutureTask is done before it can update a panel in the page with the > result of the execution. > - This works fine when I'm on the same page > - Now if I submit the form and while the AbstractAjaxTimerBehaviour is > still polling I open the same page *in a new tab* *within the same > session* then the reference to the FutureTask in the first page > (previous tab) becomes null. > > I couldn't find any solution to this problem. Any help would be greatly > appreciated. > > Thanks > -Lina > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org