Configuring Oracle for XA

SimpleDataSourceBean example

SimpleDataSourceBean ds = new SimpleDataSourceBean();
ds.setUniqueResourceName("oracle");
ds.setXaDataSourceClassName("oracle.jdbc.xa.client.OracleXADataSource");
ds.setXaDataSourceProperties("user=java;password=java;URL=jdbc:oracle:thin:@localhost-xe:1521:XE");
ds.setConnectionPoolSize(5);

Notes

Oracle 9.2 and Oracle 10 are both working fine. It is highly recommended to use the latest Oracle 10 JDBC driver even when connecting to Oracle 9 databases.

Oracle's DBMS must be configured with extra packages before you can use it with XA:

grant select on sys.dba_pending_transactions to <user name>;
grant select on sys.pending_trans$ to <user name>;
grant select on sys.dba_2pc_pending to <user name>;
grant execute on sys.dbms_system to <user name>;

Also see here: ConfiguringOracleForXA

-- GuyPardon - 14 Sep 2007

Go
r6 - 22 Jul 2008 - 07:29:06 - GuyPardon
This site is powered by the TWiki collaboration platformCopyright © contributing authors and Atomikos. All material on this collaboration platform is the shared property of the contributing authors and Atomikos.
Syndicate this site RSSATOM