Hello everyone,
We are currently testing the programs we made in appfuse. We are using
the spring implementation of appfuse. We are using hibernate to save our
data. Currently we added a transaction checking using spring's aop to roll
back saving in the database if a transaction in a method in our manager
fails, and we think that this is working.
Our problem occurred when we are saving data using 2 computers at the
same time. Specifically we are testing 2 computers to save data in our
tables at the same time. The tables that we use have relationships specified
in the hbm files. Our test results went like this :
Upon pressing the save button at the same time on both computers, only
one computer saves the data on our table. The other computer generated an
error. So when we pressed the back button of our browser on the computer
that generated the error and pressed the save button again, the data was
saved in our table.
Is there any concurrency problem here ? Could anyone give us any hint on
how to go about this ?
Thanks.
This is the error in my log file :
[vxAdmin] WARN [http-8080-Processor25]
JDBCExceptionReporter.logExceptions(71) | SQL Error: 1213, SQLState: 40001
[vxAdmin] ERROR [http-8080-Processor25]
JDBCExceptionReporter.logExceptions(72) | Deadlock found when trying to get
lock; try restarting transaction
[vxAdmin] ERROR [http-8080-Processor25] [action].invoke(253) |
Servlet.service() for servlet action threw exception
org.hibernate.exception.LockAcquisitionException: could not insert:
[com.voxsant.model.VirtualLine]
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:82)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at
org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:40)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2093)
at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2573)
--
View this message in context:
http://www.nabble.com/Concurrency-problems-in-saving-data-tf4111868s2369.html#a11691593
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]