8 Replies Latest reply on Mar 24, 2004 2:17 PM by james.clover

    Axis and Jboss in a distributed deployment

      Does anyone have experience deploying Axis and Jboss in seperate VMs? If so, what did the process involve?

      I'm sure you would lose Jboss's automatic web service deployment feature in such a deployment scenario.

      Any feedback is appreciated.

        • 1. Re: Axis and Jboss in a distributed deployment

          I'll ask the question a different way.

          My objective is to deploy Axis in it's own dedicated VM/servlet container and have it talk to an EJB deployment in seperate VM/EJB container. My reason for doing this is to improve scalability. Axis consumes a large amount of memory under load and I'd like to distribute this to another physical tier.

          My question is, can this be accomplished without writing any code. Is Axis capable of talking to a remote EJB container? This may be a question that belongs in the Axis lists but I thought I would try here as well.

          jhd

          • 2. Re: Axis and Jboss in a distributed deployment
            james.clover

            I've never done this, but I think this is actually pretty easy.

            Look at the web-service.xml file that is in your .wsr file. It'll have a line such as this:



            That "value" is the JNDI name. In this case, it's the local name, but I don't see any reason it couldn't work with the remote name.

            • 3. Re: Axis and Jboss in a distributed deployment

              I believe the line you are referring to is:



              I tried pointing jndiURL to a remote Jboss deployment running the same components. It appears to have worked. I have two identical jboss deployments with one exception, the web services on box 1 are redirected to box 2.

              WS client ==> Jboss Web Services (box 1) ==> Jboss EJBs (box 2)

              Next task will be to get a clean deployment on box 1 that is hosting web services only and no ejb components.

              Thanks for your reply.

              jhd

              • 4. Re: Axis and Jboss in a distributed deployment

                XML seems to get stripped on posts. That line is:

                parameter name="jndiURL" value="jnp://localhost:1099"

                jhd

                • 5. Re: Axis and Jboss in a distributed deployment

                  Actually, this does not work.

                  It appeared to work because I started with a full WS/EJB deployment on box 1 and the jndi lookups would work apparently still going against the local container.

                  Once I trimmed the deployment on box 1 down to WS only I get javax.naming.NameNotFoundExceptions on the WS client side. Simply specifying a different jndiURL in the web-service.xml file is not sufficient to get Axis to point to a different box for EJB calls.

                  I'll keep looking for a working solution.

                  jhd

                  • 6. Re: Axis and Jboss in a distributed deployment
                    james.clover

                    Hmm.. I'm not sure any solution without the client-side EJB components will work for you. I understand your desire for tiers, but why not have the client-side EJB stubs running in your Axis tier?

                    • 7. Re: Axis and Jboss in a distributed deployment

                      All of the required classes do reside on the WS only tier. They are in the same ear as the wsr just simply not deployed as EJB components.

                      The classes seem to load ok. If I don't include the classes in the WS ear deployment I get ClassNotFoundExceptions before an attempt to lookup the EJB.

                      Is that what you mean by client-side stubs running in the Axis only tier?

                      I've also tried making changes to jndi.properties to point to the EJB tier instead of local. That did not work. Also tried updating the JNDI section in jboss-service.xml to bind to the EJB tier; this caused other problems at startup and the EJB lookups still failed.

                      I looked at the EJBProvider source code from JBoss and Axis. Looks like they are doing a new InitialContext() before the lookup. The JNDI properties must be coming from an external source. I've tried the obvious and it doesn't appear to work.

                      jhd

                      • 8. Re: Axis and Jboss in a distributed deployment
                        james.clover

                        I haven't actually messed much with jndi.properties (on my one try, I didn't get it to work either). You may want to ask on one of the other forums.

                        The only question I can think of is "are you modifying the jndi.properties in jboss-net?"