[EJB 3.0] - Entity bean state not rolled back on TX rollback:
by jnorris10
I have an entity bean with a "id" property annotated by:
| @Id
| @GeneratedValue
|
However, when this transaction fails with a database level deadlock and is rolled back (ie: EJBTransactionRolledbackException ...), the entity's "id" property is not rolled back and still has the database generated id value that it was given before the deadlock. So it essentially becomes a detached entity with no real backing value in the database.
Shouldn't an entity bean's state be rolled back as well when the application TX is rolled back? Is this a bug?
The rollback is initiated by a database deadlock and is described by the following exception stack:
| javax.ejb.EJBTransactionRolledbackException
| javax.persistence.PersistenceException
| org.hibernate.exception.LockAcquisitionException: could not insert: ...
| java.sql.SQLException: Deadlock found when trying to get lock; try restarting transaction
|
Let me know if you need more information to reproduce/investigate this...
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957915#3957915
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957915
19 years, 9 months
[JBossCache] - Re: Problem using FileCacheLoader
by bruce_zhang
Hi, I got a 50% performance gain after I upgrade to version 1.4 even still using FileCacheLoader. (That was 100-300 ms per write, still slow though)
After I switched to JDBM cache loader, I felt that is what I am looking for: the average writing time reduced to 20-30ms and kept stable when I dumped more data.
Two more questions remain:
- Do I need JDBM project license if I want to use JdbmCacheLoader in production ?
- I simply replaced the FileCacheLoader with JdbmCacheLoader in the above config file. With the above setting, should it auto-preload all data under "/test" Node when cache.startService() get called as in my testing problem ? How do I know because it seems not doing that way.
Thanks a lot!
-Bruce
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957905#3957905
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957905
19 years, 9 months