[jboss-user] [Management, JMX/JBoss] - Local JNDI lookup in local JMX bean?

nappinc do-not-reply at jboss.com
Thu May 24 12:02:07 EDT 2007


I have a J2EE 1.4 web application (a single .war packaged in a single .ear) that contains includes both Web Service client code and some JMX beans. I can successfully invoke the web service in the web app via a JNDI lookup, but when invoking the web service from one of the JMX beans (via the JBoss Web Console) JNDI lookup fails with "service not bound".

My service reference (in web.xml) is as follows:

<service-ref>
  |     <description>Web Service Client</description>
  |     <service-ref-name>service/GMS</service-ref-name>
  |     <service-interface>javax.xml.rpc.Service</service-interface>
  |     <wsdl-file>WEB-INF/wsdl/gms.wsdl</wsdl-file>
  |    <jaxrpc-mapping-file>WEB-INF/gms-mapping.xml</jaxrpc-mapping-file>
  |     <service-qname xmlns:tns="http://..snip../gms">tns:GMS</service-qname>
  | </service-ref>

And my JNDI lookup is as follows:

Context context = new InitialContext();
  | Service service = (Service) context.lookup("java:comp/env/service/GMS");

The lookup code is called both from JMX and from code invoked by a servlet. In the servlet the lookup works, but in JMX the lookup fails.

We're using JBoss 4.0.4, Java 1.4.2, and Spring 1.2.5 to handle publishing the JMX MBeans.

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

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



More information about the jboss-user mailing list