javax.resource.ResourceException: Transaction is not active
niefeng Sep 16, 2009 1:50 PMI have encountered the following Transaction is not active exception when I performed load testing in my application.
My current setup as follow
JBOSS AS 4.2.2 GA
Postgres 8.2
JRE: JRE150_20
OS: window XP
Ram: 2GB
JVM tuning param set in jboss/bin/run.bat
set JAVA_OPTS=%JAVA_OPTS% -Xms512m -Xmx512m -XX:NewRatio=2 -XX:MaxPermSize=256m -XX:ThreadStackSize=512 -XX:GCTimeRatio=99 -XX:+DisableExplicitGC
## Scenario 1: Can not get JMS session due to Transaction is not active
[16:09:09-08:19:21,227] [ERROR:org.jboss.resource.adapter.jms.JmsSessionFactoryImpl] [JMS SessionPool Worker-9821] could not create session javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53ebe08f:e55:4aaf190a:4fceb5 status: ActionStatus.ABORTED > at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:304) at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396) at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842) at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.allocateConnection(JmsSessionFactoryImpl.java:389) at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createSession(JmsSessionFactoryImpl.java:369)
For the JMS, we are configured the JMS as follow
<!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
<tx-connection-factory>
<jndi-name>JmsXA</jndi-name>
<xa-transaction/>
<rar-name>jms-ra.rar</rar-name>
...
...
<max-pool-size>20</max-pool-size>
</tx-connection-factory>
## Scenario 2: org.jboss.util.NestedSQLException: Transaction is not active:
[16:09:09-04:54:47,180] [ERROR:org.jboss.ejb.plugins.LogInterceptor] [JMS SessionPool Worker-7846] TransactionRolledbackException in method: public abstract com.cn.framework.db.entity.IEntity com.cn.framework.framework.db.ejb.IEntityObject.getData() throws java.rmi.RemoteException, causedBy: com.cn.framework.exceptions.SystemException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53ebe08f:e55:4aaf190a:3ea4d4 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53ebe08f:e55:4aaf190a:3ea4d4 status: ActionStatus.ABORTED >) at com.cn.framework.framework.db.dao.EntityDAOImpl.load(EntityDAOImpl.java:263) at com.cn.framework.framework.db.ejb.AbstractEntityBean.ejbLoad(AbstractEntityBean.java:119) org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53ebe08f:e55:4aaf190a:3ea4d4 status: ActionStatus.ABORTED >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -53ebe08f:e55:4aaf190a:3ea4d4 status: ActionStatus.ABORTED >) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94)
For the ejb load above, we are using EJB2.1 with Bean managed persistence.
Could I know that what will be factor that can cause the transaction inactive?
Thanks !