I hacked in some code to TransactionImpl so that I can get at the
OracleXAException, and it is this error:

    ORA-24774

Is there a better way that we can expose these problems w/o having to
hack up the impl?  The XA Error code (-3) is logged, but the rest of
the exception detail is eaten, and unfortunately the is no toString()
to add this to the log detail... erg.

Should TransactionImpl be eating this exception?  Or should it rethrow
a SystemException with the XAException details?

Or should the Oracle XA JCA provide a resource wrapper wrapper to
decode the details?

 * * *

Found this related to ORA-24774:

    http://mail-archive.objectweb.org/jotm/2004-09/msg00073.html

This explains the same basic situation I'm seeing... 2 connections to
the same server, different users...

The page above mentions something about an Oracle XA flag for loosely
coupled branches... but I've really got no clue wtf that means.

So, I tried using the same user, and putting all tables into one
schema, but keep 2 datasources, and that hangs for 30s or so, then
pukes with XA error 4, Oracle error 25351, which from ora-code.com is:

<snip>
ORA-25351:      transaction is currently in use
Cause:  The transaction is currently used by a different session.
Action: Do not switch to a transaction attached to some other session.
</snip>

These all just come across as WARN logs, and eventually I get back to
the hung transaction as I saw before:

<snip>
"DefaultThreadPool 4" daemon prio=5 tid=0x09f4e5b0 nid=0x83ace00 in
Object.wait() [f7971000..f7972ac0]
        at java.lang.Object.wait(Native Method)
        - waiting on <0x6720c3a0> (a java.lang.Object)
        at org.activemq.message.ReceiptHolder.getReceipt(ReceiptHolder.java:68)
        - locked <0x6720c3a0> (a java.lang.Object)
        at 
org.activemq.transport.TransportChannelSupport.send(TransportChannelSupport.java:146)
        at 
org.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1377)
        at 
org.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1362)
        at org.activemq.TransactionContext.commit(TransactionContext.java:215)
        at 
org.activemq.ra.LocalAndXATransaction.commit(LocalAndXATransaction.java:56)
        at 
org.apache.geronimo.connector.outbound.LocalXAResource.commit(LocalXAResource.java:56)
        at 
org.apache.geronimo.transaction.manager.TransactionImpl.commitResources(TransactionImpl.java:590)
        at 
org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:313)
        at 
org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:143)
        at 
org.apache.geronimo.transaction.manager.TransactionManagerImpl$$FastClassByCGLIB$$14ee5fe0.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800)
        at 
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at 
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
        at 
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at 
org.apache.geronimo.transaction.ExtendedTransactionManager$$EnhancerByCGLIB$$19d099e1.commit(<generated>)
        at 
org.apache.geronimo.transaction.context.InheritableTransactionContext.complete(InheritableTransactionContext.java:196)
        at 
org.apache.geronimo.transaction.context.InheritableTransactionContext.commit(InheritableTransactionContext.java:146)
        at 
org.openejb.transaction.ContainerPolicy$TxRequired.invoke(ContainerPolicy.java:152)
        at 
org.openejb.transaction.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:80)
        at 
org.openejb.SystemExceptionInterceptor.invoke(SystemExceptionInterceptor.java:82)
        at org.openejb.GenericEJBContainer.invoke(GenericEJBContainer.java:238)
        at 
org.openejb.server.ejbd.EjbRequestHandler.invoke(EjbRequestHandler.java:297)
        at 
org.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:325)
        at 
org.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:196)
        at org.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:150)
        at org.openejb.server.ejbd.EjbServer.service(EjbServer.java:87)
        at 
org.openejb.server.ejbd.EjbServer$$FastClassByCGLIB$$d379d2ff.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
        at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:118)
        at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:800)
        at 
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
        at 
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:36)
        at 
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
        at 
org.activeio.xnet.ServerService$$EnhancerByCGLIB$$944b9c52.service(<generated>)
        at org.activeio.xnet.ServicePool$2.run(ServicePool.java:67)
        at org.activeio.xnet.ServicePool$3.run(ServicePool.java:90)
        at 
org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:138)
        at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
Source)
        at java.lang.Thread.run(Thread.java:552)
</snip>

And finally I tried using 1 JDBC datasource + JMS... and no exceptions
were thrown, but it still hangs just as it did before w/o XA.

--jason

Reply via email to