1 Reply Latest reply on Mar 5, 2010 1:22 PM by adrian.brock

    XADatasource Oracle configuration

    akrishmohan

      Hi -

       

      I have been trying to bind an XADatasource to JNDI and this is the configuration I am using.But for some reason, I dont see the datasource getting bound to JNDI. Not sure where the problem is. Is there any additional configuration missing? ANy pointers would be helpful.

       

      Ds.xml

       

      <datasources>
        <!-- Here's an xa example -->
        <xa-datasource>
          <jndi-name>OracleXaDS</jndi-name>
          <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
          <xa-datasource-property name="URL">jdbc:oracle:thin:@blah:1525:DB</xa-datasource-property>
          <security-domain>CustomXARealm</security-domain>

       

          <!--pooling parameters-->
          <min-pool-size>5</min-pool-size>
          <max-pool-size>100</max-pool-size>
          <blocking-timeout-millis>5000</blocking-timeout-millis>
          <idle-timeout-minutes>15</idle-timeout-minutes>

       

          <metadata>
              <type-mapping>Oracle9i</type-mapping>
          </metadata>
        
        </xa-datasource>

       

      </datasources>

       

       

      Login-config.xml

      ----------------------

       

          <application-policy name = "CustomXARealm">   
              <authentication>
                 <login-module code = "mypackage.CustomLoginModule"
                    flag = "required">
                    <module-option name = "principal">user</module-option>
                    <module-option name = "userName">user</module-option>
                    <module-option name = "password">encryptedpassword</module-option>
                    <module-option name = "managedConnectionFactoryName">jboss.jca:service=XATxCM,name=OracleXaDS</module-option>
                 </login-module>
              </authentication>
           </application-policy>

       

      Please help.(Forgot to mention - using jboss 4.3.0 GA and oracle 10g)

       

      Thanks
      K

        • 1. Re: XADatasource Oracle configuration

          First obvious point, It won't understand DS.xml it has to end with -ds.xml, e.g. oracle-xa-ds.xml

           

          Second, you know it is bound at java:/OracleXaDS?

          There should be a message on the console saying where it is bound.

           

          After that, what are the error messages in the log?

          If you are having trouble finding them, try:

           

          $ touch $JBOSS_DIST/server/xxx/deploy/oracle-xa-ds.xml

           

          to redeploy it.

           

          Also look at docs/examples/jca or this:

          http://community.jboss.org/wiki/IHaveProblemsWithOracleXA

          You need to set certain parameters because of "broken" behaviour in the Oracle driver,

          but that shouldn't stop it binding into JNDI.