-
1. Re: do me a favour about JCA in system connection !
tjp May 13, 2003 2:34 PM (in response to taobigz)Dear li.xiaotang,
This is a pretty common JDBC scenario. I'm not sure why you would need to use the J2EE Connector Architecture here, though. I'm not a DB2 person, but I know that Oracle is XA compliant and implements the XA features in their JDBC adapters. Assuming DB2 also provides an XA compliant JDBC driver, then you can simply open two different JDBC connections (using JDBC DataSources) and perform straight JDBC calls to implement your scenario.
The Connector Architecture doesn't offer much value in your scenario (except maybe in the deployment of a JDBC DataSource -- see Sun's JDBC Connector for details on this). A JDBC Connector typically wraps a JDBC driver anyway. Moreover, if a database is XA compliant, then it will implement the javax.sql.XA* stuff in its JDBC driver. Oracle's JDBC examples demonstrate this: see http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/jdbc20/DistributedTransaction/DistributedTransaction.jar (you will need to be a member of Oracle's OTN to access this file)
Best regards,
Timothy Potter
connectorWorks.org -
2. Re: do me a favour about JCA in system connection !
tjp May 13, 2003 2:38 PM (in response to taobigz)Forgot to add one thing...
You'll need some way to indicate that you want to execute your transaction scenario in the context of a JTA transaction, such as using the JTA calls directly (component managed transactions) or by using container managed transactions in an EJB method with transaction attribute "Required" or "RequiresNew" depending on your application's needs.
Cheers,
Tim -
3. Re: do me a favour about JCA in system connection !
librados May 19, 2003 7:37 PM (in response to taobigz)Save yourself the hassle!
Take a look at http://www.librados.com. They are offering SOURCE CODE to solve this problem.
They support JBOSS (and hence JCA 1.5) Weblogic and Websphere.
http://www.librados.com/ORA_APPS.pdf
For more info on Oracle integration.
Hope this helps.
Librados.