1 2 Previous Next 23 Replies Latest reply on Nov 20, 2007 9:58 AM by marklittle

    JBoss Transactions API 4.2.3 question

    breako

      I downloaded jbossts-jta-4.2.3.SP5.zip from http://labs.jboss.com/jbosstm/downloads/4.2.3.SP5 and began following the instructions detailed in

      \JBOSSTS_4_2_3_SP5\docs\install_guide\InstallGuide.pdf

      I was trying to install the windows services by running

      \JBOSSTS_4_2_3_SP5\services\bin\windows\InstallRecoveryManagerService-NT.bat

      And I get:

      D:\tools\JBoss\JTA\jta\JBOSSTS_4_2_3_SP5\services\bin\windows>"D:\tools\JBoss\JTA\jta\JBOSSTS_4_2_3_SP5\services\bin\windows\Wrapper.exe" -i "D:\tools\JBoss\JTA\jta\JBOSSTS_4_2_3_SP5\services\config\recoveryservice.conf"
      '"D:\tools\JBoss\JTA\jta\JBOSSTS_4_2_3_SP5\services\bin\windows\Wrapper.exe"' is not recognized as an internal or external command, operable program or batch file.

      Upon inspection there is no file Windows.exe file at this location?
      Any ideas of help would be appreciated
      Thanks

        • 1. Re: JBoss Transactions API 4.2.3 question
          jhalliday

          That's a known issue. It's fixed in trunk but for older releases just grab the wrapper direct from its web site.

          http://www.jboss.com/index.html?module=bb&op=viewtopic&t=116294

          • 2. Re: JBoss Transactions API 4.2.3 question
            breako

             

            "jhalliday" wrote:
            That's a known issue. It's fixed in trunk but for older releases just grab the wrapper direct from its web site.

            http://www.jboss.com/index.html?module=bb&op=viewtopic&t=116294

            Thanks for that. Are there any other files missing?
            I can't find a bat file to install the transaction sevrice, only the recovery service?


            • 3. Re: JBoss Transactions API 4.2.3 question
              jhalliday

              That's because the JTA release does not have a separate tx manager.

              • 4. Re: JBoss Transactions API 4.2.3 question
                breako

                 

                "jhalliday" wrote:
                That's because the JTA release does not have a separate tx manager.

                Sorry I am bit confused. What use is the JTA release if it does not have a transaction manager? Perhaps you could point me to a wiki or a F.A.Q.?
                Thanks


                • 5. Re: JBoss Transactions API 4.2.3 question
                  marklittle

                  The transaction manager is co-located within the same VM as the user. There is no need for a separate transaction service.

                  • 6. Re: JBoss Transactions API 4.2.3 question
                    breako

                     

                    "mark.little@jboss.com" wrote:
                    The transaction manager is co-located within the same VM as the user. There is no need for a separate transaction service.

                    Ok very confused now. Just checking through the doc JTS programmers guide, chapter 8 states that JTA only uses JTS if distributed transaction support is required.

                    So my question is in my JTA download, in \services\bin\windows I get bat files to install \ uninstall the recovermanagerservice?

                    Is this the only service I need to install?

                    Should there not be a bat file to install \ uninstall the transaction manager? If not how is it started / stopped?

                    All patience is appreciated here folks.

                    • 7. Re: JBoss Transactions API 4.2.3 question
                      marklittle

                      Try reading the docs and the blog for a start. You only need these scripts if you want to run separate services. There is NO separate service for the *local* JTA, only for the JTS (and the JTA in that distro then leverages the JTS, i.e., it is NOT the same as the local JTA). There are .bat scripts for running the services in the bin dir as well.

                      • 8. Re: JBoss Transactions API 4.2.3 question
                        breako

                         

                        "mark.little@jboss.com" wrote:
                        Try reading the docs and the <a href="http://jbossts.blogspot.com/2007/07/trying-to-put-jbossts-into-perspective_13.html">blog</a> for a start. You only need these scripts if you want to run separate services. There is NO separate service for the *local* JTA, only for the JTS (and the JTA in that distro then leverages the JTS, i.e., it is NOT the same as the local JTA). There are .bat scripts for running the services in the bin dir as well.

                        Thanks for that. I read the blog, the JTA installation guide and the install file included with the release.

                        I am still confused if I can run the *local* JTA part outside the JBoss app server? I am wondering how would the *local* JTA Manager would know to start up and what JNDI it should talk to?

                        Does anybody have a clear link how to run the *local* JTA outside JBoss, is this possibe?



                        • 9. Re: JBoss Transactions API 4.2.3 question
                          marklittle

                          Just write your Java applications and use the JTA. Make sure the TS jars are in your classpath and it will just work. Have you tried building and using the examples?

                          • 10. Re: JBoss Transactions API 4.2.3 question
                            breako

                             

                            "mark.little@jboss.com" wrote:
                            Just write your Java applications and use the JTA. Make sure the TS jars are in your classpath and it will just work. Have you tried building and using the examples?

                            Thanks for getting back.Which examples are you talking about?The recovery example here:http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossTSRecovery

                            Or the examples in the JTA programmers guide?

                            I am trying to write the simpliest possible program and then will work up from there.
                            Now with the JTA stuff on my classpath I do:

                            javax.transaction.UserTransaction ut = UserTransaction.userTransaction();
                            System.out.println("Ut is..." + ut);
                            

                            Ut ends up null.

                            I am following chapter 2 transactions, in the programmers guide which says a UserTransaction can be obtained from the static method UserTransaction.userTransaction().

                            Some obvious problems here:
                            1. I haven't configured anything so that the
                            arjuna core will now what data source is associated with this transaction

                            also
                            2. Should JNDI not come into play some how?
                            3. Does a *local* transaction manger need to be started, if so how?

                            Again, apologies for my stupidity here, but I am getting lost.

                            Thanks


                            • 11. Re: JBoss Transactions API 4.2.3 question
                              marklittle

                              Work your way through the JTA Programmers Guide. The answers are in there.

                              • 12. Re: JBoss Transactions API 4.2.3 question
                                breako

                                 

                                "mark.little@jboss.com" wrote:
                                Work your way through the JTA Programmers Guide. The answers are in there.

                                Thanks I am doing that. Some questions if that's ok:
                                1.
                                Chapter 2, Transactions.
                                From the perspective of trying to run *local* JTA transactions, what is the difference between javax.transaction.Transactions and javax.transaction.UserTransaction? When would you use one or the other?

                                2.
                                chapter 5, JDBC and transactions.

                                In the example in chapter JDBC and transactions page 30, a JNDI InitialContext is instantiated.

                                However it is unclear as to what default setting are passed to its constructor.
                                I presume the line:

                                String initalCtx = PropertyManager.getProperty("Context.INITAL_CONTEXT_FACTORY");
                                

                                is supposed to be:
                                String initalCtx = jtaPropertyManager.getPropertyManager().getProperty("Context.INITAL_CONTEXT_FACTORY");
                                


                                Also, how is this property set? what should it be set to?

                                From reading the JNDI spec, Context.INITIAL_CONTEXT_FACTORY should be set to fully qualified name of the factory class that is used to create the context.

                                Examples include: com.sun.jndi.fscontext.RefFSContextFactory, com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.rmi.registry.RegistryContextFactory, com.sun.jndi.cosnaming.CNCtxFactory, com.sun.jndi.dns.DnsContextFactory

                                What should it be set to use *local* JTA transactions?

                                Many thanks


                                • 13. Re: JBoss Transactions API 4.2.3 question
                                  marklittle

                                  The answers to your configuration questions are in Chapter 2. The answers to why you would use one type of transaction (or API) over another are in Chapter 2, the JTA specification and in this book.

                                  • 14. Re: JBoss Transactions API 4.2.3 question
                                    marklittle

                                    BTW, sorry for the short answers, but we're extremely busy at the moment.

                                    1 2 Previous Next