Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to lookup local EJB in Oracle Weblogic 10.3

843830Jul 17 2009 — edited Aug 11 2010
Hello all,

I have a very simple app deploy as an EAR (with a ejb-jar and a war files) on Oracle Weblogic Server 10.3, but I am having problems to lookup and local ejb stateless session bean with a JNDI name.

I can not figure out what is the correct JNDI name for local ejb local. Remote lookup works fines though.

This is my ejb:
@Local({my.Foo})
@Remote({my.FooRemote})
@Stateless(name="Foo",mappedName="Foo")
public class FooBean implements Foo, FooRemote {
  public void bar() { }
}
This works:
FooRemote foo = (FooRemote) ctx.lookup("Foo#my.FooRemote");
This does NOT works:
Foo  foo = (Foo) ctx.lookup("Foo");
I have tried with all this JNDI names:

Foo
Foo#my.Foo
ejb/Foo
my.jar#Foo

and a dozen of options.

It works very well on JBoss (with correct JNDI), but I am facing trouble to find out the right JNDI name for local lookup.

Need help!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 8 2010
Added on Jul 17 2009
16 comments
898 views