0 Replies Latest reply on Sep 26, 2006 10:42 AM by satyanarayana murthy

    jboss OracleXA transactions

    satyanarayana murthy Newbie

      hi,
      i'am using jboss 4.0.5 and OracleXADataSource(oracle-xa-ds.xml) for accessing a Distributed transactions. but i have an Error:
      java.lang.ClassCastException: org.jboss.resource.adapter.jdbc.WrapperDataSource

      here is my oracle-xa-ds.xml


      <xa-datasource>
      <jndi-name>XAOracleDS</jndi-name>
      <track-connection-by-tx>true</track-connection-by-tx>
      <isSameRM-override-value>false</isSameRM-override-value>
      <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
      <xa-datasource-property name="URL">jdbc:oracle:thin:@192.168.0.230:1521:sevenora</xa-datasource-property>
      <xa-datasource-property name="User">scott</xa-datasource-property>
      <xa-datasource-property name="Password">tiger</xa-datasource-property>
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
      <no-tx-separate-pools/>

      <type-mapping>Oracle9i</type-mapping>

      </xa-datasource>


      <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager




      here my code:

      Context jndiCntx = new InitialContext();
      OracleXADataSource oxds2 = (OracleXADataSource)jndiCntx.lookup("java:comp/env/ShhDB");
      XAConnection pc2 = oxds2.getXAConnection();
      Connection conn2 = pc2.getConnection();
      XAResource oxar2 = pc2.getXAResource();

      So if anybody could help me, i would be very pleased