3 Replies Latest reply on May 19, 2003 7:37 PM by librados

    do me a favour about JCA in system connection !

    taobigz

      i want to get some help from you.
      Now my J2EE platforms are websphere application developer and jboss.EISs are oracle9i and db2.
      And there are two applications on WSAD and Jboss seperately,the association between the two applications is one app on WSAD would take out some money from a table in oracle9i and transfer it to db2,just like finance transfer.
      I want to know how can i connect the two applications by JCA and accomplish the function of finance transfer use DTP specifications.The global transaction process is based on the XA.
      How can i do now ?
      Would you tell me the steps and way to complete the work of connecting two
      Apps?How to deploy the environment,and examples about this kind of problem?
      I learned JCA just now.So i am very poor in JCA and EAI.please help me!!It is really helpful if you could response me as soon as possilbe.
      I am looking forward to hearing from you soon!Thank you very much for your help!

      thanks!
      li.xiaotang.

        • 1. Re: do me a favour about JCA in system connection !
          tjp

          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

            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

              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.