I have a client that calls a single stateless session bean. When I run this on the
local WL server, everything works fine. When I try to run this with the EJB deployed
on a different computer, it keeps failing. The Weblogic 7.0beta installation is
identical for both computers.
Here is the code for the client lookup:
private TestDBHome lookupHome() throws NamingException
{
log("inside lookupHome");
// Lookup the beans home using JNDI
Context ctx = getInitialContext();
log("step 2 of lookupHome");
try {
Object home = ctx.lookup("TestDBBean");
log("step 3 of lookupHome");
return (TestDBHome) narrow(home, TestDBHome.class);
} catch (NamingException ne) {
log("The client was unable to lookup the EJBHome JNDI_NAME.");
throw ne;
}
}
It obtains the initial context fine. When it gets to the ctx.lookup("TestDBBean"),
it throws the error:
javax.naming.NameNotFoundException: Unable to resolve 'TestDBBean' Resolved: ''
Unresolved:'TestDBBean' ; remaining name
'TestDBBean'
at
weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:109)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:261)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:228)
at weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:338)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:333)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at TestDBClient.lookupHome(TestDBClient.java:166)
at TestDBClient.<init>(TestDBClient.java:42)
at TestDBClient.main(TestDBClient.java:87)
If someone has any suggestions or could point out what I am over looking, I would
greatly appreciate it.
Thanks,
Bill
Something like this
Stringt urlOfHost = "t3://abc.com:7001";
// Get an InitialContext
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
h.put(Context.PROVIDER_URL, urlOfHost);
Context ctx = new InitialContext(h);
"Bill R." <bru...@tripos.com> wrote in message
news:3CB36F16...@tripos.com...