0 Replies Latest reply on Jul 1, 2003 4:41 PM by sashahunt

    Oracle XA setup problem

    sashahunt

      Hello,
      Can anyone tell me what is wrong with my
      oracle-xa-service.xml file? I'm using jboss-3.0.7_jakarta-tomcat-4.1.24 with Oracle 9.2.0.2.1 on Windows 2000. I get an error when trying to perform
      a getConnection using the java:/XAOracleDS.
      I don't have any client-side oracle installed if that makesa difference, but do have all the .dlls inthe PATH.

      Note that I got this file from the "examples" directory
      in the distribution and I fixed the reference to InformixDS in my login-config.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->




      <!-- ==================================================================== -->
      <!-- ConnectionManager setup for xa oracle dbs -->
      <!-- Thanks to igor fedorenko <ifedorenko@thinkdynamics.com> -->
      <!-- Build jmx-api (build/build.sh all) and view for config documentation -->
      <!-- YOU MUST CHANGE THE XidFactoryMBean config (in conf/jboss-service.xml -->
      <!-- or transaction-service.xml) to this: -->
      <!--

      true

      -->
      <!-- ==================================================================== -->




      <depends optional-attribute-name="ManagedConnectionFactoryName">
      <!--embedded mbean-->


      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss JDBC XATransaction ResourceAdapter

      <!--real attributes -->


      <config-property name="XADataSourceProperties"
      type="java.lang.String">URL=jdbc:oracle:oci:@(description=(address=(host=cat-3.mycorp.com)(protocol=tcp)(port=1521))(connect_data=(sid=student)))</config-property>
      <config-property name="XADataSourceClass"
      type="java.lang.String">oracle.jdbc.xa.client.OracleXADataSource</config-property>
      <config-property name="IsSameRMOverrideValue" type="java.lang.Boolean">false</config-property>

      <!--set these only if you want only default logins, not through JAAS -->
      <config-property name="UserName"
      type="java.lang.String"></config-property>
      <config-property name="Password"
      type="java.lang.String"></config-property>
      <!--
      Do not try to set transaction isolation level here or you'll get
      java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement of transaction
      Read committed is a default isolation level for Oracle, so there
      is not real need to set it here. I'll take a look into it later ...maybe.
      <config-property name="TransactionIsolation"
      type="java.lang.String">TRANSACTION_READ_COMMITTED</config-property>
      -->


      XAOracleDS



      <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->


      0
      50
      5000
      15
      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports
      reauthentication)-->
      ByContainer


      <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

      <!-- Include a login module configuration named OracleXaDbRealm.
      Update your login-conf.xml, here is an example for a
      ConfiguredIdentityLoginModule:

      <application-policy name = "OracleXaDbRealm">

      <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
      <module-option name = "principal">yourprincipal</module-option>
      <module-option name = "userName">yourusername</module-option>
      <module-option name = "password">yourpassword</module-option>
      <module-option name = "managedConnectionFactoryName">jboss.jca:service=XATxCM,name=InformixXaDS</module-option>
      </login-module>

      </application-policy>

      NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
      module-option name = "managedConnectionFactoryName"
      must match the object name of the ConnectionManager you are configuring here.
      -->
      <!--uncomment out this line if you are using the OracleXaDbRealm above BETH -->
      OracleXaDbRealm


      <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager

      java:/TransactionManager