8 Replies Latest reply on Jan 16, 2007 10:51 AM by marklittle

    Where to put jbossjta-properties.xml

    timfox

      I'm getting the transaction manager programmatically from within our test framework:

      TransactionManager tm = com.arjuna.ats.jta.TransactionManager.transactionManager();
      


      But I'm not sure where to put jbossjta-properties.xml so it gets picked up... anywhere on the classpath?

        • 1. Re: Where to put jbossjta-properties.xml
          marklittle

          If not passed an absolute filename (starting with the string abs://), then the system searches for the file in the order:
          * current working directory
          * in the directory specified by the system property user.dir
          * in the directory specified by the system property user.home
          * in the directory specified by the system property java.home
          * using the getResource() method

          • 2. Re: Where to put jbossjta-properties.xml
            timfox

             

            "mark.little@jboss.com" wrote:
            If not passed an absolute filename (starting with the string abs://), then the system searches for the file in the order:
            * current working directory
            * in the directory specified by the system property user.dir
            * in the directory specified by the system property user.home
            * in the directory specified by the system property java.home
            * using the getResource() method


            Thanks.

            How do I specify the absolute filename? It's passed into what method?

            • 3. Re: Where to put jbossjta-properties.xml
              marklittle

              System.

              • 4. Re: Where to put jbossjta-properties.xml
                marklittle

                I think there's something in the manuals on this ;-)

                • 5. Re: Where to put jbossjta-properties.xml
                  timfox

                  Yes, RTFM. But honestly I have read through both the JTA programmers and admin guide and can find nothing on where to put this file.

                  It goes into detail of what properties the file contains, but not where it should be placed. Maybe I am blind or going/gone mad, both fairly likely, but I swear I couldn't find this info. :)

                  Stupid question number 2, what the heck is this "System" method?

                  All I have a is a method com.arjuna.ats.jta.TransactionManager.transactionManager() which doesn't take any params, there is also a static initialise() method - perhaps that's what you mean??



                  • 6. Re: Where to put jbossjta-properties.xml
                    marklittle

                    I meant System properties, e.g., on the command line.

                    What you're looking for is:

                    -Dcom.arjuna.ats.arjuna.common.propertiesFile=blah

                    • 7. Re: Where to put jbossjta-properties.xml
                      timfox

                      That works.

                      The documentation also states:


                      The node identifier to
                      use should be provided to JBossTS via a property that starts with the
                      name com.arjuna.ats.jta.xaRecoveryNode


                      Am I supposed to set a system property or do I specify this "property" in jbossjta-properties.xml?

                      If in jbossjta-properties.xml, in what section of the file? I assume under ?

                      • 8. Re: Where to put jbossjta-properties.xml
                        marklittle

                        It should go into the JTA section.