2 Replies Latest reply on Feb 23, 2009 5:07 AM by spaluvuri

    Oracle XA datasoruce with jboss

      Hi,

      I am trying to configure the jboss with oraclexa datasources.
      I want two databases to be configured in the configuration file.

      I do not know how to configure two databases in xa.
      The following is my one of the datasource.

      Can anyone please let me know

      how can i give the configuration for the second database?

      Are there any other settings do i need to take care of?

      I dont know whether i am giving the correct configuration.

      please let me know.


      <xa-datasource>
      <jndi-name>Name1</jndi-name>
      <track-connection-by-tx></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">url1</xa-datasource-property>
      <xa-datasource-property name="User">test</xa-datasource-property>
      <xa-datasource-property name="Password">test123</xa-datasource-property>
      <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
      <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
      <!-- Checks the Oracle error codes and messages for fatal errors -->
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
      <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
      <no-tx-separate-pools></no-tx-separate-pools>


      </xa-datasource>





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



      Thanks
      Sreenivas

        • 1. Re: Oracle XA datasoruce with jboss
          dasariprasad

          under you can create another element tree of <xa-datasource>

          • 2. Re: Oracle XA datasoruce with jboss

            Hi Prasad,

            Thanks for the reply. I have added one more datasource with <xa-datasource>. But there is a problem.
            When i add the data to the database through my application, the data is added/updated only in first datasource. The second database is not updated.
            I mean the distributed insertion / update is not happening.

            Can you suggest me if i need to do any other settings?

            Thanks
            Sreenivas