5 Replies Latest reply on Oct 29, 2007 11:43 AM by Jonathan Halliday

    transaction across jvms

    Vyacheslav Evgrafov Newbie

      Dear JBossTS community,
      during last couple of days I've been trying to create java standalone client application that works with my EJBeans 2.1 in one transaction. Here is my results:

      1) JBossAS 4.0.5 + JBossTS 4.2.3SP5 - could not start CorbaORB service on java5 (release notes says it should be run on java1.4 but my app is already written on java5)
      2) JBossAS 4.2.1 + JBossTS 4.3.0 beta2 - my EJBs failed to obtain transaction context. Jhalliday says: "The pluggable JTS transaction handling for EJBs is broken i n AS 4.2 and will need API changes to fix". (http://www.jboss.com/index.html?module=bb&op=viewtopic&t=122025)
      3) JBossAS 5.0.0 beta2 - could not find appropriate version of JBossTS.

      My question is: is it possible to create standalone java application that works in one transaction with EJBs deployed in JBoss? Geronimo, for instance doesn't support it yet. (http://www.nabble.com/when-to-suspend-a-transaction--t4644327s134.html)

      Are there any other solutions that would allow to achieve my goal?

      Thanks a tons for any response.

        • 1. Re: transaction across jvms
          Andrew Dinn Master

          Well, points two and three are no-brainers. AS 5.0.0.Beta2 is a work in progress and still contains defects that only an experienced AS user can hope to circumvent. In particular, that explains why you cannot find a TS release to fit it -- there ain't one yet. Similar story with 4.3.0.Beta2.
          You could avoid a lot of wasted time if you stopped downloading Beta software when you have not familiarized yourself with the certified releases. The latter course might also enable you to follow the copious advice Jonathan gave in the thread you cite (and from which you have rather selectively quoted) and thus resolve the question yourself.

          • 2. Re: transaction across jvms
            Jonathan Halliday Master

            > during last couple of days I've been trying to create java standalone client application that works with my EJBeans 2.1 in one transaction.

            Are all the beans in one server JVM? Does the client JVM actually contain any transactional resources? I'm just curious why you are going for JTS rather than remote transactions boundary demarcation with the JTA.

            > 1) JBossAS 4.0.5 + JBossTS 4.2.3SP5 - could not start CorbaORB service on java5

            Works for me. Exactly what is your environment and what is the error you get when you try this?

            > 2) JBossAS 4.2.1 + JBossTS 4.3.0 beta2 - my EJBs failed to obtain transaction context.

            What transport are you using for the method calls? Do the logs show the transaction interceptors on the client and server being invoked during the call?

            > 3) JBossAS 5.0.0 beta2 - could not find appropriate version of JBossTS.

            There is not a supported one yet. TS 4.3.0 is a work in progress. That said, it way work for certain scenarios.

            • 3. Re: transaction across jvms
              Vyacheslav Evgrafov Newbie

              Guys, thank you very much for your replies.

              >Are all the beans in one server JVM? Does the client JVM actually contain any transactional resources? I'm just curious why you are going for JTS rather than remote transactions boundary demarcation with the JTA.

              Yes, all beans in one server jvm. Another JVM (OFBiz) has its own datasource. I need them both in one transaction.

              > 1) JBossAS 4.0.5 + JBossTS 4.2.3SP5 - could not start CorbaORB service on java5

              Starting jboss:service=CorbaORB
              java.lang.NoClassDefFoundError: com/sun/corba/se/internal/iiop/ShutdownUtilDelegate
              This class exists in sdk1.4 but not in java5

              > 2) JBossAS 4.2.1 + JBossTS 4.3.0 beta2 - my EJBs failed to obtain transaction context.
              I think this is related to the following messages in jboss's console:
              [JtaTransactionManager] Using JTA UserTransaction: org.spring framework.transaction.jta.UserTransactionAdapter@1a0d510
              [JtaTransactionManager] Using JTA TransactionManager: com.arjuna.ats.jbossatx.jts.TransactionManagerDelegate@4198e

              I think, Spring was unable to lookup UserTransaction and have created local one.
              As a proof of my guessing, there is a following message in log file:
              [org.springframework.transaction.jta.JtaTransactionManager] No JTA UserTransaction found at default JNDI location [java:comp/UserTransaction]









              • 4. Re: transaction across jvms
                Vyacheslav Evgrafov Newbie

                jhalliday, where can i read about "remote transactions boundary demarcation with the JTA"?

                I looked at manuals shipped with JbossTS and found nothing about remote capabilities of JTA.

                • 5. Re: transaction across jvms
                  Jonathan Halliday Master

                  That's because it's nothing to do with JBossTS, it's an app server thing.