6 Replies Latest reply on Nov 14, 2002 8:53 PM by Adrian Brock

    JMS jdbc2.PersistenceManager Oracle

    Kevin Urciolo Newbie

      I am attempting to persist my messages to Oracle with the following configuration:


      <depends optional-attribute-name="MessageCache">jboss.mq:service=MessageCache
      <depends optional-attribute-name="DataSource">jboss.jca:service=LocalTxDS,name=CMISDS
      jboss.jca:service=LocalTxCM,name=CMISDS

      BLOB_TYPE=BINARYSTREAM_BLOB
      INSERT_TX = INSERT INTO JMS_TRANSACTIONS (TXID) values(?)
      INSERT_MESSAGE = INSERT INTO JMS_MESSAGES (MESSAGEID, DESTINATION, MESSAGEBLOB, TXID, TXOP) VALUES(?,?,?,?,?)
      SELECT_ALL_UNCOMMITED_TXS = SELECT TXID FROM JMS_TRANSACTIONS
      SELECT_MAX_TX = SELECT MAX(TXID) FROM JMS_MESSAGES
      SELECT_MESSAGES_IN_DEST = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE DESTINATION=?
      SELECT_MESSAGE = SELECT MESSAGEID, MESSAGEBLOB FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
      MARK_MESSAGE = UPDATE JMS_MESSAGES SET (TXID, TXOP) VALUES(?,?) WHERE MESSAGEID=? AND DESTINATION=?
      DELETE_ALL_MESSAGE_WITH_TX = DELETE FROM JMS_MESSAGES WHERE TXID=?
      DELETE_TX = DELETE FROM JMS_TRANSACTIONS WHERE TXID = ?
      DELETE_MARKED_MESSAGES = DELETE FROM JMS_MESSAGES WHERE TXID=? AND TXOP=?
      DELETE_MESSAGE = DELETE FROM JMS_MESSAGES WHERE MESSAGEID=? AND DESTINATION=?
      CREATE_MESSAGE_TABLE = CREATE TABLE JMS_MESSAGES ( MESSAGEID INTEGER NOT NULL, \
      DESTINATION VARCHAR(255) NOT NULL, TXID INTEGER, TXOP CHAR(1), \
      MESSAGEBLOB BLOB, PRIMARY KEY (MESSAGEID, DESTINATION) )
      CREATE_TX_TABLE = CREATE TABLE JMS_TRANSACTIONS ( TXID INTEGER )



      ------------------------------------------------------

      The tables are created, and messages are inserted correctly, but I receive the some of the following exceptions throughtout my code:

      javax.transaction.xa.XAException
      at org.jboss.mq.SpyXAResource.commit(SpyXAResource.java:100)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:294)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:603)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:417)
      at org.jboss.mq.SpySession.run(SpySession.java:296)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:178)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:642)
      at java.lang.Thread.run(Thread.java:536)

      14:32:27,646 WARN [TxCapsule] XAException: tx=XidImpl [FormatId=257, GlobalId=WP-URCIOLOK-C1//13, BranchQual=] errorCode=XA_UNKNOWN(0)
      javax.transaction.xa.XAException: could not commit local txjavax.resource.ResourceException: SQLException
      at org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener.commit(LocalTxConnectionManager.java:567)
      at org.jboss.tm.TxCapsule.commitResources(TxCapsule.java:1714)
      at org.jboss.tm.TxCapsule.commit(TxCapsule.java:393)
      at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:73)
      at org.jboss.mq.pm.jdbc2.PersistenceManager$TransactionManagerStrategy.endTX(PersistenceManager.java:177)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:698)
      at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:41)
      at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:116)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:398)
      at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:376)
      at org.jboss.mq.server.JMSServerInvoker.addMessage(JMSServerInvoker.java:137)
      at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:248)
      at java.lang.Thread.run(Thread.java:536)

      javax.transaction.xa.XAException
      at org.jboss.mq.SpyXAResource.commit(SpyXAResource.java:100)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:294)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:603)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:417)
      at org.jboss.mq.SpySession.run(SpySession.java:296)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:178)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:655)
      at java.lang.Thread.run(Thread.java:536)

      Any ideas what is causing this?

        • 1. Re: JMS jdbc2.PersistenceManager Oracle
          Tom Sawyer Newbie

          I think that's a bug somewhere in the implementation. I've been running load testing on jboss_3.0.5RC1 build and its jms implementation seems to be better. I used to get that commit exception too once in a while but I don't get it anymore. You might want to check out branch_3_0 and see if you still have this problem.

          • 2. Re: JMS jdbc2.PersistenceManager Oracle
            Tom Sawyer Newbie

            After few hours of load testing of jboss 3.0.3 with jboss_mq from jboss 3.0.5RC1. I see this exception happening on my end too. Could the developers look into this?


            2002-11-12 20:49:37,517 WARN [org.jboss.tm.TxCapsule] XAException: tx=XidImpl [FormatId=257, GlobalId=bhh147//937341, BranchQual=] errorCode=XAER_RMERR
            javax.transaction.xa.XAException
            at org.jboss.mq.SpyXAResource.commit(SpyXAResource.java:100)
            at org.jboss.tm.TxCapsule.commitResources(TxCapsule.java:1714)
            at org.jboss.tm.TxCapsule.commit(TxCapsule.java:393)
            at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:73)
            at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:319)
            at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:1205)
            at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:833)
            at org.jboss.mq.SpySession.run(SpySession.java:296)
            at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:177)
            at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:655)
            at java.lang.Thread.run(Thread.java:536)


            -------------------------------------------------------

            • 3. Re: JMS jdbc2.PersistenceManager Oracle
              Adrian Brock Master

              Can you try it with jboss-head?
              I committed some fixes to jdbc2 over the weekend.

              Regards,
              Adrian

              • 4. Re: JMS jdbc2.PersistenceManager Oracle
                manish Newbie

                Hi,
                I noticed that you are getting the same errors that I was getting on hsqldb and the problem looks quite similar.

                Adrian posted a solution on this thread for my problem. http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ this helps!

                -manish



                • 5. Re: JMS jdbc2.PersistenceManager Oracle
                  Tom Sawyer Newbie

                  This might be off topic, but what's the difference between tag jboss_head from branch_3_0?

                  The fix you checked in, is that in branch_3_0 as well? Or do I have to check out jboss_all again with "jboss_head" tag and rebuild it? There are some fixes in "branch_3_0" cvs that I dont' want to lose.

                  • 6. Re: JMS jdbc2.PersistenceManager Oracle
                    Adrian Brock Master

                    Hi,

                    jboss-head is 4.0.0alpha which won't be officially
                    released (as an alpha) until the end of this year,
                    early next year?

                    This is the main-line code for new developments.
                    We generally put new code/experimental in jboss-head
                    before jboss-3.0 (old name jboss-all)

                    Fixes normally go into jboss-3.0 first then into
                    jboss-head later.

                    In this case I have significantly changed the way the
                    MessageCache does synchronization to improve
                    performance and fix some holes in jdbc2.

                    Since this is a major change, I want other people
                    to test it before I backport to the stable jboss-3.0

                    I would post the change note url, but sourceforge
                    is down at the moment. :-(
                    You can find it by going to www.sf.net/project/jboss
                    and clicking on tracker.
                    I'll post it later if I remember.

                    Regards,
                    Adrian