2011-09-10 41 views
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) 

如上所述herehere OracleXAResource.recover()需要一定的補助。我不需要恢復,也不喜歡應用這些oracle設置,因此我想禁用Bitronix恢復。我在Bitronix Configuration docs中找不到任何相關信息,所以我想問問這裏是否可以禁用Bitronix恢復功能?

回答

3

如果您使用XA,則需要恢復,它是XA協議的一部分。不執行XA恢復將違反XA協議。你確定你真的瞭解這些影響嗎?否則,你需要一個不同的協議。

+0

我能夠禁用JBossTS的恢復,所以我認爲應該也可以禁用BTM恢復。從JTA開始,我只需要2PC。這是否意味着恢復? – Mohsen

+0

是的,我建議你閱讀XA規範 – steve