Chapter 14. Frequently Asked Questions

14.1. I have problems with Oracle XA

Check the following:
  • Is pad=true for the XidFactory in conf/jboss-service.xml?
  • Is <track-connection-by-tx/> set in your oracle-xa-ds.xml? (This may not be required. The element is deprecated, and enabled by default.)
  • Is <isSameRM-override-value>false</isSameRM-override-value> set in your oracle-xa-ds.xml?
  • Is <no-tx-separate-pools/> set in your oracle-xa-ds.xml?
  • Does jbosscmp-jdbc.xml specify the version of Oracle you are using?
  • Does the Oracle server you connect to support XA?
You can configure Oracle database to support XA resources. This enables you to use JDBC 2.0-compliant Oracle driver. To XA-initialize Oracle database, complete the following steps:
Ensure that Oracle JServer is installed with your database. If it is not installed, add it using the Oracle Database Configuration Assistant.
  1. Launch the Oracle Database Configuration Assistant. You can do this by typing dbca at the command prompt. In a Windows environment, you can launch it from the Start menu, under Configuration Assistants.
  2. Select "Change an Existing DB".
  3. Select the database to which you wish to add Oracle JServer. Then, click Next.
  4. Select Oracle JServer, and then click Finish.
If your previous database settings are not suitable or insufficient for the Oracle JServer installation, you will be prompted to enter additional parameters. The database configuration file, init.ora, is located in \oracle\admin\$DATABASE_NAME\pfile.
Execute initxa.sql over your database. By default, this script is located in \oracle\ora81\javavm\install. If errors occur during execution, you must execute the SQL statements in the script manually.
Use DBA Studio to create a package and package body named JAVA_XA in SYS schema, and an identically named JAVA_XA in PUBLIC schema.
More detailed instructions can be found at http://www.ibm.com/developerworks/websphere/library/techarticles/0407_woolf/0407_woolf.html?ca=dnp-327#oracle_exception, Configuring and using XA distributed transactions in WebSphere Studio - OracleXAException.