This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Lookup EJB3 from web app in weblogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Lookup EJB3 from web app in weblogic" Watch "Lookup EJB3 from web app in weblogic" New topic

Lookup EJB3 from web app in weblogic

Tulika Garg

Joined: Mar 27, 2009
Posts: 6

I am trying to lookup a stateless session bean from my web application. My web application and jar containing EJB are packaged in same ear file. I am using EJB3 and Weblogic 10.3
I have specified local-jndi-name of my EJB in weblogic-ejb-jar.xml packaged with my EJB jar.

But I am unable to lookup this EJB from my web app using JNDI name "Repository/local" .
I then included an ejb-local-ref to this EJB in web.xml of my web app like this

Then I was able to lookup this EJB in my web app using JNDI name "java:comp/env/ejb/Repository".

Now my question is, if I have specified local JNDI name in weblogic-ejb-jar.xml, do I still have to include an ejb-ref in my web.xml to lookup that EJB? Is there some other way using which I can lookup EJB using JNDI name I specify in weblogic-ejb-jar.xml, without modifying my web.xml?

I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Lookup EJB3 from web app in weblogic
It's not a secret anymore!