2 Replies Latest reply on Oct 16, 2007 4:20 PM by rupshall

    using Tomcat to serve EJB requests

    Brian Murphy Newbie

      Dear all,

      I am a newbie to EJB.

      I have machine 'A' running Tomcat and machne 'B' running JBoss , I'd like Tomcat on machine 'A' to serve up EJB requests instead of using the embedded Tomcat of Jboss on machine 'B'.

      How can I configure , guess via JNDI to achieve that ?

      Thanks for any hints

      Look forward to any reply.


        • 1. Re: using Tomcat to serve EJB requests
          Walter Herbert Newbie


          I have the same configuration. I did copy the lib's from Jboss to webapps/"something"/WEB-INF/lib


          put a jndi.properties file in classpath (webapps/"something"/WEB-INF/classes)


          and importend add the starting parameter to Tomcat -nonaming

          EJB 3.0 lookup
          InitialContext itx = new InitialContext();
          ModulDataManager modulDataManager = (ModulDataManager) itx.lookup("ModulDataManagerBean/remote");

          I think this is very dirty but works easy. I woud be happy to have a nicer way! Mainly the "-nonaming" i did't like!

          • 2. Re: using Tomcat to serve EJB requests
            rupshall Newbie

            I hate to reanimate this post but it is exactly what I want to do. I'm running Tomcat 5.5.23 and attempting to access EJB on a 4.0.5.GA JBoss server.

            I have copied my jndi.properties into WEB-INF/classes and I have jbossall-client.jar in WEB-INF/lib. I have 2 cases:
            1. When I have jbossall-client.jar in WEB-INF/lib in get java.lang.NoClassDefFoundError: javax/ejb/CreateException
            2. When I move jbossclient-all.jar to shared/lib I get javax.naming.NameNotFoundException: Name UtilitiesFacadeEJB is not bound in this Context

            In case 1 its clear it doesn't find the jbossall-client.jar, why would that be? In case 2 it does find the required JBoss classes but is unable to locate the EJB. It doesn't appear to be finding jndi.properties.

            I tried to pass the -nonaming into the tomcat startup.sh script but my Tomcat instance doesn't appear to start when I do.

            I have spend all day searching forums and google, trying everything I find with no luck. Can somebody point me in the proper direction?