1 2 Previous Next 20 Replies Latest reply on Sep 6, 2007 9:42 AM by gbiemolt Go to original post
      • 15. Re: JTA & Webservices
        gbiemolt

        however if I'm not mistaken, the web service should always be possible to create a com.arjuna.mw.wst.UserTransaction, and being able to initialize it, regardless if the context is created by the client, isn't it? because currently I'm also not able to retrieve such a transaction in tomcat.

        regards

        • 16. Re: JTA & Webservices
          jhalliday

          To get a valid coordination context, the UserTransaction needs to exchange messages with the coordinator service. That is to say, begin() requires whatever is calling it to be capable of receiving web service calls. How are you deploying XTS into tomcat? It is possible, but we don't bundle scripts to do it so you must have written your own?

          • 17. Re: JTA & Webservices
            gbiemolt

            we have performed the following steps:

            1. Copy from %JBOSSTS%\xts\lib all (five) 'ws*.jar' files to %TOMCAT%\shared\lib

            2. Copy from %JBOSSTS%\xts\lib\ext 'jbossts.jar' and 'jbossts-common.jar' to %TOMCAT%\shared\lib

            3. Adapt the xml files in %JBOSSTS%\xts\conf to your configuration and add them to 'config.jar'. Put the jar file in %TOMCAT%\shared\lib

            4. Move from %TOMCAT%\webapps\axis\WEB-INF\lib the files 'wstx-asl-2.9.3.jar' and 'stax-api-1.0.jar' to %TOMCAT%\shared\lib. Make sure the files do not remain in their old location (do not copy them), as this will cause a classloader conflict.

            5. Copy all (four) 'ws*.war' files from %JBOSSTS%\xts\webapps to %TOMCAT%\webapps

            6. Configure the BaseHttpURI parameter in %TOMCAT%\webapps\ws-c.war\WEB-INF\web.xml to match the host and port of the Tomcat server

            7. Create a context for the xts webapp in %TOMCAT%\conf\server.xml. Add the following two lines below the other contexts:



            However, that for implementing jbossts into tomcat, apparently in some xml files: context.xml and server.xml additional statements should be made:

            - add to tomcat/conf/server.xml

            - add to tomcat/conf/context.xml



            - add the following lines to the code:
            InitialContext ctx = new InitialContext();
            ut = (UserTransaction) ctx.lookup("java:comp/UserTransaction");

            but this generates the following context exception:
            javax.naming.NameNotFoundException: Name UserTransaction is not bound in this Context

            regards

            • 18. Re: JTA & Webservices
              jhalliday

              - add the following lines to the code:
              InitialContext ctx = new InitialContext();
              ut = (UserTransaction) ctx.lookup("java:comp/UserTransaction");

              Huh? That's not XTS, that's JTA. If you expect JTA to work in tomcat you have a whole new deployment issue :-)

              • 19. Re: JTA & Webservices
                jhalliday

                XTS does not publish itself into JNDI by default. How are you doing that? Does begin() work if called on a wst UserTransaction you get from the UserTransactionFactory, in the same way as the BasicClient does?

                • 20. Re: JTA & Webservices
                  gbiemolt

                  well there's the bloody problem as well, according to

                  http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
                  and
                  http://java.sun.com/products/jndi/tutorial/getStarted/concepts/naming.html

                  one can just put some xml statements into the server.xml and context.xml files: (apperentally not displayed in the previous post)
                  - add to /conf/server.xml
                  Transaction name="UserTransaction" factory="com.arjuna.mw.wst.UserTransactionFactory "/>
                  - add to /conf/context.xml
                  ResourceLink name="UserTransaction" global="UserTransaction" type="com.arjuna.mw.wst.UserTransactionFactory"/>

                  which should point to the right XTS transaction instead of JTA isn't it?

                  and you are right, the transaction is not initialized, this ut.begin doesn't run.

                  1 2 Previous Next