Configuring Oracle
Changed by
WoutSteurs on
19 Mar 2010 - 05:38 - r10
AtomikosDataSourceBean example
AtomikosDataSourceBean ds = new AtomikosDataSourceBean();
ds.setUniqueResourceName("oracle");
ds.setXaDataSourceClassName("oracle.jdbc.xa.client.OracleXADataSource");
Properties p = new Properties();
p.setProperty ( "user" , "java" );
p.setProperty ( "password" , "java" );
p.setProperty ( "URL" , "jdbc:oracle:thin:@localhost-xe:1521:XE" );
ds.setXaDataSourceProperties ( p );
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: Configuring Oracle for XA 
本文介绍了如何使用AtomikosDataSourceBean配置Oracle数据库以支持XA事务。提供了具体的配置示例,并说明了Oracle 9.2和10版本的兼容性和推荐设置。此外还列举了为了支持XA事务Oracle数据库必须进行的一些额外配置。
893

被折叠的 条评论
为什么被折叠?



