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!

ejb-reference-description in weblogic.xml is not working

843829May 7 2003 — edited May 7 2003
I have the appropriate ejb-ref in my web.xml file...

<ejb-ref>
<ejb-ref-name>com.nam.onesource.fsi.MySesionHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.nam.onesource.fsi.MySesionHome</home>
<remote>com.nam.onesource.fsi.MySesion</remote>
<ejb-link>MySessionBean</ejb-link>
</ejb-ref>

And since we are deploying on Weblogic 7.0, the appropriate piece in the weblogic.xml:

<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>com.nam.onesource.fsi.MySesionHome</ejb-ref-name>
<jndi-name>MySessionBeanJNDI</jndi-name>
</ejb-reference-description>
</reference-descriptor>

The jndi name exactly matches the jndi name given in weblogic-ejb-jar.xml file and the <ejb-link> exactly matches the <ejb-name> in ejb-jar.xml file.
When I see the web application load up in the Weblogic server log, it is correctly associated with the ejb-ref with the jndi-name, but at runtime when I try to look up the bean from the servlet with the folowing code,

Class c = com.nam.onesource.fsi.MySessionHome.class;
String string = "java:comp/env/" + c.getName();
Context ctx = new InitialContext();
home = (EJBHome)PortableRemoteObject.narrow(ctx.lookup(string), c);

The association is not made. The lookup is done with the name "com.nam.onesource.fsi.MySesionHome" which should actually be "MySessionBeanJNDI". Please help me out...
thanks
manish
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2003
Added on May 7 2003
1 comment
205 views