1 2 3 Previous Next 36 Replies Latest reply on Nov 29, 2013 10:26 AM by tomjenkinson Go to original post
      • 30. Re: JBoss Transaction not rolling back
        tomjenkinson

        Please do let me know when you have JTS enabled. I am pretty positive you will need to use the CORBA names for the EJB.


        If you have a scenario where you do not have transactional resources in AS 1 _and_ 2, the quickest way to coordinate a transaction at AS2 would be to add a new EJB on AS2 with @REQUIRES and that performs the coordination of the EJBs for you. It should perform better as you won't have a chatty exchange to coordinate the transaction between the two servers, just a single invocation. To be clear, do you have transactional resources that are required in the same transaction at both servers?

        • 31. Re: JBoss Transaction not rolling back
          memyself141

          Didn't get you... There's just 1 transactional resource at the remote server (the database which I am looking up from the local EJB via DataSource JNDI like InitialContext.lookup("dataSource"). Or are you asking something else??

          • 32. Re: JBoss Transaction not rolling back
            tomjenkinson

            I was asking if there are transactional resources at the local server too.

            • 33. Re: JBoss Transaction not rolling back
              memyself141

              Nope. just a single datasource at the remote server. the EJBs are updating that datasource only.

               

              Small favour Tom, could you deploy the war file attached here at your machine's JBoss to see if you too get ServerVMClientUserTransaction instead of ClientUserTransaction. If we can find out why am I getting ServerVMClientUserTransaction when looing up UserTransaction on a remote JBoss from a client-side JBoss, I believe all my problems will be solved... If you have some time... no pressure...

              • 34. Re: JBoss Transaction not rolling back
                tomjenkinson

                I tried your app but it seems to assume that there is a second server running and I am not positive how to run two AS5 instances on the same box. To be honest when it comes to AS questions like that you are better asking them on the AS list.

                 

                What we can help with is configuring JTS, but from the sounds of your app you would be much better:

                 

                1. Create a new session bean that does most of your servlets logic, mark it as @REQUIRES

                2. Deploy it on server 2

                3. Call this EJB from the servlet in server1, don't do transaction demarcation here, it should be all done in the new EJB

                 

                I grepped the internet a lot looking for an answer for you, you could ask the person here: [jboss-as7-dev] UserTransaction used by remote clients who seems to know how this used to be done, but I suspect it was truly remote clients and not remote application servers?

                 

                To help understand why I can't help too much, you are in the forum for the Transaction Manager (2PC engine), a lot of the questions are are asking are more related to EJB and the AS integration with the Transaction Manager so they are better asked in the AS forum. Unfortunately the application server you are using I am not sure if it is supported in the community any more. It looks like this is where you would ask the question "how do I resolve a usertransaction from a different JBoss server in JBoss 5.1.2": JBoss AS

                 

                Please do let me know how you get on, particularly I would like to know if you are able to introduce the new EJB, alternatively if you have questions on enabling JTS I am sure we can try to answer those as Mike pointed you out a great article he wrote on that one.

                • 35. Re: JBoss Transaction not rolling back
                  memyself141

                  oh i totally understand that Tom. Thank you so much for taking so much pains for this. I will ask this again in the AS5 forum. Regarding your solution about deploying a new EJB on the remote server, I can't do that as that server is for the 3rd party tool (That is why i have raised a request to turn the JTS on. I can't do it on my own). Will update you with the progress. Maybe this will help someone else facing a similar problem later sometime Thank you once again....

                  And thanks to you too Michael

                  • 36. Re: JBoss Transaction not rolling back
                    tomjenkinson

                    Great, well JTS should make this work too, I just think it could perform better with that remote EJB as you won't have two round trips to server 2.

                     

                    Let me know how you get on with enabling JTS and hopefully it is plain sailing once it is enabled

                    1 2 3 Previous Next