[jboss-user] [JNDI/Naming/Network] - Problems with JNDIBindingServiceMgr

diegomansua do-not-reply at jboss.com
Wed Jun 10 03:34:08 EDT 2009


Hi. I'm migrating from Tomcat to JBoss and I'm facing a problem with a Tomcat valve we're using. This valve expected a resource declared using GlobalNamingResources, which, AFAIK, is not supported in JBoss and we're told to use JNDIBindingServiceMgr instead (https://jira.jboss.org/jira/browse/JBAS-1826).

So, I've declared a JNDI binding using JNDIBindingServiceMgr on my jboss-service.xml, where I put the object that previously was bound using GlobalNamingResources.

The problem is that this valve implements org.apache.catalina.Lifecycle, and it performs the JNDI lookup on its start() method, maybe too early because it seems JNDIBindingServiceMgr hasn't bound the object yet and throws a NameNotFoundException.

I've made a simple web app with a servlet which performs a lookup for the same name and it retrieves the object correctly. It also shows on JNDIView.

In my logs, it seems that JNDIBindingServiceMgr is created before the valve tries to get the object:


  | 2009-06-10 09:28:10,859 DEBUG [org.jboss.system.ServiceController] Creating service jboss.tests:service=JNDIBindingServiceMgr
  | 2009-06-10 09:28:10,859 DEBUG [org.jboss.naming.JNDIBindingServiceMgr] Creating jboss.tests:service=JNDIBindingServiceMgr
  | 2009-06-10 09:28:10,859 DEBUG [org.jboss.naming.JNDIBindingServiceMgr] Created jboss.tests:service=JNDIBindingServiceMgr
  | ...
  | 2009-06-10 09:28:19,765 ERROR [org.apache.catalina.startup.Catalina] Catalina.start: 
  | LifecycleException:  javax.naming.NameNotFoundException: protocolConfiguration not bound
  | 

Is there anything I can do?

Thanks in advance

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236570#4236570

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236570



More information about the jboss-user mailing list