This content has been marked as final.
Show 3 replies
-
1. Re: Lookup of jmx/rmi/RMIAdaptor fails in 3.2.3
juha Dec 12, 2003 6:37 PM (in response to gwwallace)It does show up ok on my JNDIView:
Global JNDI Namespace
+- jmx (class: org.jnp.interfaces.NamingContext)
| +- invoker (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor (proxy: $Proxy22 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor)
| +- rmi (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
Does it show up on yours? -
2. Re: Lookup of jmx/rmi/RMIAdaptor fails in 3.2.3
gwwallace Dec 15, 2003 9:15 AM (in response to gwwallace)Yes i can see it in JNDIView, just cant access it from code.
-
3. Re: Lookup of jmx/rmi/RMIAdaptor fails in 3.2.3
thezman Jan 3, 2004 2:39 PM (in response to gwwallace)Do you still have this problem?
I think you are missing the step to narrowing the context to the right object. Usually in naming service, you obtain a root context object like this:import javax.naming.Context; import javax.naming.InitialContext; import javax.rmi.PortableRemoteObject; InitialContext ctx = new InitialContext(env); Object ref = ctx.lookup("jmx/invoker/RMIAdaptor");
And then you need to narrow it to the right object like this:RMIAdaptor rmiAdapter =(RMIAdaptor)PortableRemoteObject.narrow(ref, RMIAdaptor.class);
cheers