Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
Hi, if any of you could help, we have a problem in one of our wicket installations. We have a system that connects to another system. Sometimes the system's reply lasts for more than a minute. Wicket is having problem with regards to the page map being locked. I click for example on a page to

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
I'd suggest running the transaction in the background (separate thread) and using an AjaxStoppableSelfUpdatingTimer to periodically check if the thread was finished and only do the redirect after finishing. This way, the pagemap remains unlocked. 2010/1/21 Carlo Camerino carlo.camer...@gmail.com:

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
hi, i believe this is due to the fact that wicket has synchronized page maps for access. do you think it is safe to remove it? what are the precautions when removing synchronized for wicket page maps? Is there a setting that I could use to disable this? Thanks A Lot Carlo On Thu, Jan 21,

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
I'd suggest adapting your application to use Wicket properly instead of the other way around. I'm not a Wicket Dev but I'm pretty sure that desynchronizing page map access will cause more problems than it solves. Your problem is that Page A displays data which can take a lot of time to gather due

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Ernesto Reinaldo Barreiro
Why not follow the Jeroen's suggestion instead of trying to trick framework internals? Ernesto On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino carlo.camer...@gmail.comwrote: hi, i believe this is due to the fact that wicket has synchronized page maps for access. do you think it is safe

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
if i can't do this, is there anyway that i could at least increase the timeout of the pagemap to greater than 1 minute? 1 minute would be too little i guess On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Why not follow the Jeroen's suggestion instead of

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
is there anyway that i could just kill the previous thread? On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino carlo.camer...@gmail.comwrote: if i can't do this, is there anyway that i could at least increase the timeout of the pagemap to greater than 1 minute? 1 minute would be too little i

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
If you do it my way, then you don't have to 2010/1/21 Carlo Camerino carlo.camer...@gmail.com: is there anyway that i could just kill the previous thread? On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino carlo.camer...@gmail.comwrote: if i can't do this, is there anyway that i could at

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Martijn Dashorst
Read up on Future's in the java.concurrent packages. They might provide you with a good way to work with answers that lie in the future... Martijn On Thu, Jan 21, 2010 at 12:14 PM, Carlo Camerino carlo.camer...@gmail.com wrote: is there anyway that i could just kill the previous thread? On

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Ernesto Reinaldo Barreiro
Carlo, If you need some code illustrating how to do this, I can mail you the source code of a similar use case: creating a lengthy PDF and providing users with progress feedback... It uses the same approach Jeroen mentioned. Best, Ernesto On Thu, Jan 21, 2010 at 12:21 PM, Jeroen Steenbeeke

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
hi, please do. thanks a lot! On Thu, Jan 21, 2010 at 3:38 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Carlo, If you need some code illustrating how to do this, I can mail you the source code of a similar use case: creating a lengthy PDF and providing users with progress

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
where do i get this class? AjaxStoppableSelfUpdatingTimer ? On Thu, Jan 21, 2010 at 3:43 AM, Carlo Camerino carlo.camer...@gmail.comwrote: hi, please do. thanks a lot! On Thu, Jan 21, 2010 at 3:38 AM, Ernesto Reinaldo Barreiro reier...@gmail.com wrote: Carlo, If you need some code

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
My apologies, that is a class we use internally. Must have confused it with some basic wicket class. You can use AbstractAjaxTimerBehavior to similar effect. Just override the onTimer method 2010/1/21 Carlo Camerino carlo.camer...@gmail.com: where do i get this class?

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Carlo Camerino
no prob. i was thinking, if was going to do timerbehaior approach, might as well go with comet have any of you guys used comet for this kind of situation before? thanks carlo On Thu, Jan 21, 2010 at 3:54 AM, Jeroen Steenbeeke j.steenbeeke.ml@ gmail.com wrote: My apologies, that is a class we

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
Afraid not, but I believe wicketstuff-push is integrated with comet. 2010/1/21 Carlo Camerino carlo.camer...@gmail.com: no prob. i was thinking, if was going to do timerbehaior approach, might as well go with comet have any of you guys used comet for this kind of situation before? thanks

Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Ernesto Reinaldo Barreiro
I would use timer as comet introduces additional dependencies... I have used comet-push for other things but not via wicket-stuff project. Thus, I can't offer any help. Ernesto On Thu, Jan 21, 2010 at 1:07 PM, Carlo Camerino carlo.camer...@gmail.comwrote: no prob. i was thinking, if was