-
1. Re: jndi lookup
joelvogt Oct 3, 2002 10:07 PM (in response to benholland)can you post lookup code + error trace?
-
2. Re: jndi lookup
benholland Oct 4, 2002 4:27 AM (in response to benholland)System.setProperty("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
System.setProperty("java.naming.provider.url",
"localhost:1099");
// Enclosing the whole process in a single `try' block is not an ideal way
// to do exception handling, but I don't want to clutter the program up
// with catch blocks
try
{
// Get a naming context
InitialContext jndiContext = new InitialContext();
System.out.println("Got context");
// Get a reference to the Interest Bean
Object ref = jndiContext.lookup("Interest");
System.out.println("Got reference");
// Get a reference from this to the Bean's Home interface
IMyFirstHomeInterface home = (IMyFirstHomeInterface)
PortableRemoteObject.narrow (ref, IMyFirstHomeInterface.class);
// Create an Interest object from the Home interface
IMyFirstSession interest = home.create(); -
-
4. Re: jndi lookup
benholland Oct 4, 2002 10:03 AM (in response to benholland)I had a look through the server log and can find no mention of binding Interest to the JNDI??
-
5. Re: jndi lookup
benholland Oct 4, 2002 12:17 PM (in response to benholland)the problem was in the jboss.xml file