[jboss-user] [JNDI/Naming/Network] - JBoss 4.2, Tomcat, and @Service ...
do-not-reply at jboss.com
Mon Aug 11 15:23:38 EDT 2008
I have a service (singleton) that I want to access from a Tomcat servlet. The tomcat servlet cannot find the service using the MBean server's JNDI name - I always get the name not found exception.
The service I have registered is using @Service annotation without the deployment descriptor. The creation, registration and starting of my singleton @Service object is successfully in the MBean server with the default JNDI name (I didn't assign one). The service has a @Local and @Management interface with no home interface to speak of. I don't anticipate that I will ever need a remote interface or binding since the service will always be used within the same JVM.
- I've tried using the usual <resource-ref> <ejb-ref> in the "web.xml" with associated entries in the "jboss-web.xml" to map the "java:/comp/env/ejb/*" entry to the "jboss.j2ee:*" entry. Each time the tomcat end complains that it cannot find the JNDI name of the "jboss.j2ee:" service as registered in the MBean server (tomcat DOES follow the "java:comp/env/ejb" link successfully).
- I've tried deployment of the tomcat "context.xml" file in META-INF to tell it about the JNDI bindings with the same result.
Any ideas?!?! Any suggestions will be appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169955#4169955
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169955
More information about the jboss-user