-
1. Re: InterestEJB not bound
jdecastroll Nov 8, 2001 1:50 PM (in response to jdecastroll)well I'd change the code and add this some lines but the problem is the same
some help??
try {
// Set up the naming provider. This may not always be necessary,
// depending on how your Java system is configured.
System.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
System.setProperty("java.naming.provider.url",
"localhost:1099");
// Get a naming context
Hashtable env = new Hashtable();
env.put(InitialContext.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.put(InitialContext.PROVIDER_URL, "localhost:1099");
env.put(InitialContext.URL_PKG_PREFIXES, "org.jboss.naming");
InitialContext jndiContext = new InitialContext(env);
// Get a reference to the Interest Bean
Object ref = jndiContext.lookup("java:/InterestEJB");
// Get a reference from this to the Bean's Home interface
InterestHome home = (InterestHome)
PortableRemoteObject.narrow (ref, InterestHome.class);
// Create an Interest object from the Home interface
m_resource = home.create();
} catch(Exception e) {
System.out.println("Excepción: " + e );
}
}
I dont hunderstand why for but no one ejb run the problem is always the same "not bound"