4 Replies Latest reply on Jan 26, 2009 1:17 PM by b.eckenfels

    Queue Receiver hangs after rollbacks caused by XAResource ti

    ntsankov

      We have several MDBs receiving and sending messages and performing some DB operations, and we use XA transactions to ensure correct behavior. JBoss version is 4.0.5, DB is Oracle.

      The problem we have is that sometimes, under heavy load, some MDB stops receiving messages and they pile up on the queue. Sometimes stopDelivery() and startDelivery() helps, sometimes a restart is needed.

      The cause seems to be that XAResources do not use the configured transaction timeout and cause exceptions if they timeout before the transaction is commited. Luckily they can be configured in the datasource xml with <xa-resource-timeout> , but I think those timeouts and XA exceptions should not cause the destinations to get stuck. Is this a bug or am I missing something.

      The datasource is configured with:

      <no-tx-separate-pools/>
      <track-connection-by-tx>true</track-connection-by-tx>
      <isSameRM-override-value>false</isSameRM-override-value>
      

      and we have this MBean declaration




      <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter" name="jboss.jca:service=OracleXAExceptionFormatter">
       <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
      </mbean>


      And in jboss-service.xml:
      <mbean code="org.jboss.tm.XidFactory"
       name="jboss:service=XidFactory">
       <attribute name="Pad">true</attribute>
      </mbean>