This content has been marked as final.
Show 3 replies
-
1. Re: MBean always uses local bean despite a lookup on a remot
starksm64 Nov 11, 2004 8:02 PM (in response to wagemono)You have to connect to the remote server via a different url to access the remote mbean server and your mbean. Show the code your using to do this.
-
2. Re: MBean always uses local bean despite a lookup on a remot
wagemono Nov 12, 2004 5:08 AM (in response to wagemono)private SearcherService getSearcherService(String serverName) throws NamingException {
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
props.put(Context.PROVIDER_URL, serverName + ":1099");
InitialContext ic = new InitialContext(props);
return (SearcherService) ic.lookup(SearcherService.JNDINAME);
} -
3. Re: MBean always uses local bean despite a lookup on a remot
wagemono Nov 12, 2004 6:36 AM (in response to wagemono)I've sussed it now. You need to call the MBeanServer I was treating it like an EJB. Thanks for the pointer.