3 Replies Latest reply on Aug 2, 2002 1:46 PM by bruce

    Grabbing a transaction from JBoss via Castor continually fai

    bruce

      I'm building an application that is using Castor for persisting objects and I'm using the JBoss TransactionManager for container managed transactions. Inside of TransactionManager.getThreadInfo(), there's a call to:

        ThreadInfo ret = (ThreadInfo)threadTx.get();

      This call instantiates the ThreadInfo inner class and sets the following:

        long timeout = 0;
        TransactionImpl tx = null;

      The problem with this is that the tx object is then null. This null tx object is sent back to Castor to use and because it's null, a NullPointerException is thrown every time. The extremely odd thing is that after running my test and receiving the NPE, I wait a bit and I see the following message come across the log file:

      [WARN,TxCapsule] Transaction XidImpl [FormatId=257, GlobalId=bsnyderlnx.xyz.com//0, BranchQual=] timed out. status=STATUS_ACTIVE

      So I have two questions about this scenario:

      1) Is this possibly a timing issue whereby the transaction is not created immediately? If so, maybe I could sleep for a bit to see if the transaction is actually created.

      2) Has anyone else encountered this or have I possibly configured something incorrectly?

      Thanks,

      Bruce Snyder