All,

I am running into a TransactionException when using wicket with
hibernate/databinder. If anyone could look at my use case I would appreciate
it; I am including a quickstart to demonstrate the problem.

The user clicks a button to fire an ajax request, then submits the page
before the ajax request is finished. In the debugger, I can see that the two
requests are running concurrently. Specifically, the onBeginRequest of the
second request is firing before the onEndRequest of the first request
finishes.

In my case, the onEndRequest rolls back the hibernate session's transaction,
after the next request begins a transaction (if one is not present) but
before it calls commit - this results in the hibernate exception that is
shown in the quickstart.

In my real use case, the user closed a modal window, then clicks a
SubmitLink on the parent page before the WindowClosedCallback's request is
finished. The quickstart uses only one page with two different operations
(no modal window).

Intuitively I feel like this is not correct wicket behavior (requests for
the same session on the same page should be handled in sequence?), but maybe
I am mistaken. Please correct me if I am doing something wrong.

Note - in order to make the quickstart run, you must re-add hsqldb.jar and
hsqldb-sources.jar (from http://hsqldb.sourceforge.net/) in the project lib/
folder; and you must run the "dbstart" Ant task to start the HSQLDB server.
I used the latest stable HSQLDB version, 1.8.0.10

This issue is also posted on the Databinder forum:
http://databinder.net/forum/viewtopic.php?f=1&t=335

Thanks for any help you guys can offer,
Russell

P.S. The actual error is thrown by the Hibernate session because it is the
same session used by both threads in our conversation. We do this to prevent
problems with lazy initialization, and to take advantage of the objects the
session keeps in memory.

http://www.nabble.com/file/p19747385/quickstart-requestCycle.zip
quickstart-requestCycle.zip 
-- 
View this message in context: 
http://www.nabble.com/Concurrent-requests---TransactionException-tp19747385p19747385.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to