XA Transactions and Jboss 4.2.3
pedrosena Mar 3, 2009 5:00 PMHi Guys,
I'm new to XA transaction, but I believe that this is some kind of unexpected behavior.
My scenario:
I have a web application that has one database schema per user, plus a global schema that all users share.
I'm having trouble trying to make operations in both schemas in the same method.
I read from schema1 then I try to insert in schema2, the following exception is thrown when I try to insert in schema 2(after reading from 1)
org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) ... Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f5701ff:78e:49ada4b1:3 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f5701ff:78e:49ada4b1:3 status: ActionStatus.ABORT_ONLY >) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94) at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423) ... 94 more Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f5701ff:78e:49ada4b1:3 status: ActionStatus.ABORT_ONLY > at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:340) at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:394) at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88) ... 96 more
I tried a local-tx-datasource and a XA datasource, in both situations I got the same error.
Am I missing something here?
Thanks in advance,
Pedro Sena