1 Reply Latest reply on Sep 20, 2004 3:51 PM by Adrian Brock

    Unable to commit, STATUS_NO_TRANSACTION, on xa-datasource us

    jim stafford Newbie

      I am looking for an answer as to why my xa-datasource scenario fails to commit and to determine if there is any configuration changes that can be made to correct the situation.

      I have created a set of DataSource configurations for testing. My test case works fine with the local-tx-datasource that comes with DefaultDS/hsql-ds.xml and one that I created with Pointbase. I am now trying to get an xa-datasource working and am again using Pointbase and JBoss4.0.0RC1 & RC2.

      I get the following error when I try to set an attribute within a CMP entity bean. The EntityEJB has tx=MANDATORY and the SessionEJB has tx=REQUIRED. (If I relax the tx requirements to SUPPORTS, the scenario works using the xa-datasource)

      21:27:31,615 ERROR [LogInterceptor] TransactionRolledbackException in method: public abstract void corej2ee.examples.sim
      ple.hello.HelloRemote.setMessage(java.lang.String) throws java.rmi.RemoteException, causedBy:
      org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=BLITZ/15, Branc
      hQual=, localId=15] status=STATUS_NO_TRANSACTION

      My ds.xml file contains...

      <datasources>
       <xa-datasource>
       <jndi-name>coredev/jdbc/pointbase/XaDS</jndi-name>
       <xa-datasource-class>com.pointbase.xa.xaDataSource</xa-datasource-class>
       <xa-datasource-property name="DatabaseName">
       jdbc:pointbase:server://localhost:9092/coredev
       </xa-datasource-property>
       <xa-datasource-property name="User">pbpublic</xa-datasource-property>
       <xa-datasource-property name="Password">pbpublic</xa-datasource-property>
       </xa-datasource>
      </datasources>
      


      My ejb-jar has the following
      <assembly-descriptor>
       <container-transaction>
       <method>
       <ejb-name>MessageEJB</ejb-name> <<==this is EntityEJB
       <method-name>*</method-name>
       </method>
       <trans-attribute>Mandatory</trans-attribute>
       </container-transaction>
       <container-transaction>
       <method>
       <ejb-name>HelloEJB</ejb-name> <<==this is SessionEJB
       <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
       </container-transaction>
      </assembly-descriptor>
      


      My jbosscmp.xml is configured to use PointBase mapping and is quite simple.
      <jbosscmp-jdbc>
       <defaults>
       <datasource>java:coredev/jdbc/pointbase/XaDS</datasource>
       <datasource-mapping>PointBase</datasource-mapping>
       <create-table>true</create-table>
       <remove-table>true</remove-table>
       </defaults>
       <enterprise-beans>
       <entity>
       <ejb-name>MessageEJB</ejb-name>
       <table-name>simpleApp_Message</table-name>
       <cmp-field>
       <field-name>id</field-name>
       <column-name>id</column-name>
       </cmp-field>
       <cmp-field>
       <field-name>message</field-name>
       <column-name>message</column-name>
       </cmp-field>
       </entity>
       </enterprise-beans>
      </jbosscmp-jdbc>
      
      


      thanks,
      jim