1 2 3 Previous Next 36 Replies Latest reply on Sep 5, 2007 10:49 AM by marklittle Go to original post
      • 15. Re: One transaction on two machines
        marklittle

        Sorry, still don't quite get it. You said one application terminates and yet it comes back later? In the same state? On some different machine?

        Why can't you implement this using some kind of third-party that actually manages the transactions on behalf of the other applications? You'd sent it the "begin", "commit" and "roll back" requests when and if needed.

        • 16. Re: One transaction on two machines
          sl4ve

          It comes back on the same machine with the same state (we have a state manager to handle that).

          Do you know some such third-parties? We need it to work with ESB and to support Two-phase commit protocol.

          • 17. Re: One transaction on two machines
            marklittle

            This is now an ESB discussion. Please take it to the ESB forums.

            • 18. Re: One transaction on two machines
              sl4ve

              Going back to JBoss Transactions...

              Could you tell me how to run one transaction in two processes on the same Application Server? I think that is what I should start with.

              You've said that context propagation is not enough. What more should I do? How to do that through JMS? Give me a clue or some example code.

              Greets
              Wiktor

              • 19. Re: One transaction on two machines
                marklittle

                One transaction across two VM instances? Correct?

                • 20. Re: One transaction on two machines
                  sl4ve

                  Yeah. That's right.

                  • 21. Re: One transaction on two machines
                    marklittle

                    In which case you have a couple of options, assuming these instances are JBossAS running JBossTS: use RMI/IIOP or use SOAP/HTTP.

                    For JMS, use JBoss Messaging 1.4GA when it's out.

                    • 22. Re: One transaction on two machines
                      a.gazzarini

                      Excuse me, what does it means use RMI/IIOP"? What I have to do to use it in my code?

                      Thanks

                      • 23. Re: One transaction on two machines
                        sl4ve

                        I would appreciate answering to that question too.

                        • 24. Re: One transaction on two machines
                          marklittle

                          SOAP/HTTP is short-hand for SOAP-over-HTTP.

                          RMI/IIOP is short-hand for RMI-over-IIOP.

                          If you don't understand what IIOP is, then I suggest you google and do some background research before going any further.

                          • 25. Re: One transaction on two machines
                            sl4ve

                            I would have wanted you to answer the second question - how to use it in my code?

                            • 26. Re: One transaction on two machines
                              a.gazzarini

                              Thanks for reply...I've done the following:

                              - added an interceptor <invoker-proxy-binding-name>iiop</invoker-proxy-binding-name>
                              to my ejb
                              - Installed JBossTS on my JBoss;
                              - Used the following to lookup the ejb:

                              ...
                              initCtxEnv.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
                              initCtxEng.put(Context.PROVIDER_URL,"corbaloc::localhost:3528/NameService");
                              ...
                              Context defaultCtx = new InitialContext(initCtxEnv);
                              Object ref = defaultCtx.lookup("xservice");

                              But when the last line (lookup) is called JBoss logs :

                              13:39:17,734 WARN [poa] POA Naming rid: 2 opname: _non_existent _invoke: object key not previously generated!
                              13:39:17,750 WARN [poa] POA Naming rid: 3 opname: resolve _invoke: object key not previously generated!

                              Do you know if I miss something?

                              Thanks in advance...

                              • 27. Re: One transaction on two machines
                                a.gazzarini

                                A step ahead...
                                using a custom policy file (for now granting all) the invocation of the ejb is done correctly...
                                Unfortunately, the transaction isn't still propagated....

                                • 28. Re: One transaction on two machines
                                  marklittle

                                   

                                  "SL4VE" wrote:
                                  I would have wanted you to answer the second question - how to use it in my code?


                                  I'm sorry, but I don't quite understand what you mean. How to use transactions in your code?

                                  • 29. Re: One transaction on two machines
                                    marklittle

                                     

                                    "a.gazzarini" wrote:
                                    A step ahead...
                                    using a custom policy file (for now granting all) the invocation of the ejb is done correctly...
                                    Unfortunately, the transaction isn't still propagated....


                                    It may be easier to understand what is supposed to happen (and why) if you strip out TS from AS. Have you tried running JBossTS stand-alone and using the JTS implementation for performing distributed transactions? If not, give that a try. And before you ask: it's in the docs, the wiki page and there are links off the labs page too.