-
1. Re: RMI Ojbect Binding Problem in JNDI
adrian.brock May 12, 2004 2:28 AM (in response to anil_gv)Show how/what you bind.
It can only be garbage collected if it is not referenced by something. -
2. Re: RMI Ojbect Binding Problem in JNDI
anil_gv May 12, 2004 3:53 AM (in response to anil_gv)Following method creates context.
using the context i will call Context.rebind() / Context.bind() method.
public static Context getInitialContextJBoss() throws Exception {
String url = "jnp://localhost:1099";
String user = null;
String password = null;
Properties properties = null;
try {
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.PROVIDER_URL, url);
if (user != null) {
properties.put(Context.SECURITY_PRINCIPAL, user);
properties.put(Context.SECURITY_CREDENTIALS, password == null ? "" : password);
}
return new InitialContext(properties);
}
catch(Exception e) {
throw e;
}
}