[jboss-user] [Datasource Configuration] - jboss OracleXA transactions

ksnmurthy do-not-reply at jboss.com
Tue Sep 26 10:42:33 EDT 2006


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 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974237#3974237

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974237



More information about the jboss-user mailing list