1
我面臨以下情況例外,當一個連接是從甲骨文收購:如何禁用Bitronix JTA恢復
javax.transaction.xa.XAException
at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:705)
at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:103)
at bitronix.tm.recovery.RecoveryHelper.recover(RecoveryHelper.java:61)
at bitronix.tm.recovery.IncrementalRecoverer.recover(IncrementalRecoverer.java:64)
at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:106)
at bitronix.tm.resource.common.XAPool.getConnectionHandle(XAPool.java:97)
at bitronix.tm.resource.jdbc.PoolingDataSource.getConnection(PoolingDataSource.java:207)
at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:71)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:160)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:81)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:60)
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.enlistInCurrentTransaction(ExtendedEntityManagerCreator.java:421)
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.doJoinTransaction(ExtendedEntityManagerCreator.java:398)
at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:350)
at $Proxy48.joinTransaction(Unknown Source)
at org.springframework.orm.jpa.EntityManagerFactoryUtils.doGetTransactionalEntityManager(EntityManagerFactoryUtils.java:174)
at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:211)
at $Proxy48.getDelegate(Unknown Source)
如上所述here和here OracleXAResource.recover()需要一定的補助。我不需要恢復,也不喜歡應用這些oracle設置,因此我想禁用Bitronix恢復。我在Bitronix Configuration docs中找不到任何相關信息,所以我想問問這裏是否可以禁用Bitronix恢復功能?
我能夠禁用JBossTS的恢復,所以我認爲應該也可以禁用BTM恢復。從JTA開始,我只需要2PC。這是否意味着恢復? – Mohsen
是的,我建議你閱讀XA規範 – steve