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)
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces java.naming.provider.url=jnp://"otherMachine":1099
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!
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?