Transaction Deadlock
nitesh Sep 18, 2001 12:23 PMHello,
I'm doing some performance tests with JBoss 2.4.0. In my test, I'm trying to:
1. create (50, 100, 1000) CMP beans using (1, 5, 10) cuncurrent clients.
2. lookup (using findByPrimaryKey method) already created beans using (1, 5, 10) concurrent clients.
3. invoke a getter method on an already created bean using (1, 5, 10) concurrent clients.
Test 2 and 3 succeeds, but Test 1 fails with multiple concurrent clients (transaction deadlock). I've tried out this test with "Required" and "RequiresNew" transactional attribute on the bean.
Please help me in figuring out how to get the Test 1 to work with multiple concurrent clients!
Thanks,
Nitesh
The error stack is as follows:
[EntitySynchronizationInterceptor] Store failed
java.rmi.ServerException: Store failed; nested exception is:
java.sql.SQLException: [ARES]Your transaction (process ID #7) was deadlocked with another process and has been chosen as the deadlock victim. Rerun your transaction.
at com.inet.tds.a.a(Unknown Source)
at com.inet.tds.b.for(Unknown Source)
at com.inet.tds.b.executeUpdate(Unknown Source)
at org.opentools.minerva.jdbc.PreparedStatementInPool.executeUpdate(Pr
aredStatementInPool.java:82)
at org.jboss.ejb.plugins.jaws.jdbc.JDBCUpdateCommand.executeStatementA
HandleResult(JDBCUpdateCommand.java:49)
at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand
ava:160)
at org.jboss.ejb.plugins.jaws.jdbc.JDBCStoreEntityCommand.execute(JDBC
oreEntityCommand.java:97)
at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.storeEntity(JAWSP
sistenceManager.java:168)
at org.jboss.ejb.plugins.CMPPersistenceManager.storeEntity(CMPPersiste
eManager.java:397)
at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:252)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor$InstanceSync
onization.beforeCompletion(EntitySynchronizationInterceptor.java:400)
at org.jboss.tm.TxCapsule.doBeforeCompletion(TxCapsule.java:1210)
at org.jboss.tm.TxCapsule.commit(TxCapsule.java:304)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:76)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterc
torCMT.java:521)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.
va:86)
....