This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes BEA/Weblogic and the fly likes Cant do dependency injection of EJB3 stateless bean from a servlet in Weblogic 10.3.6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Cant do dependency injection of EJB3 stateless bean from a servlet in Weblogic 10.3.6" Watch "Cant do dependency injection of EJB3 stateless bean from a servlet in Weblogic 10.3.6" New topic
Author

Cant do dependency injection of EJB3 stateless bean from a servlet in Weblogic 10.3.6

Anirban Chowdhury
Ranch Hand

Joined: Aug 05, 2008
Posts: 36
I tried all day today to inject my EJB3 from a serlet. Unfortunately couldn't get it to work.
Weblogic version : 10.3.6


**My EJBs**




**My Servlet**



I have an application.xml and a web.xml but no ejb-jar.xml or other deployment descriptors as I will be using only annotations as of now.

Now, I can do a perfect lookup using the specified JNDI name, however the DI doesn't happen.
I have tried with :@EJB(mappedName="testFirstStatelessBean") as well on the servlet. Even that doesn't work. Please let me know what can be done here?


To living life on the edge! I blog my experiences @ http://anirbanchowdhury.wordpress.com.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cant do dependency injection of EJB3 stateless bean from a servlet in Weblogic 10.3.6
 
Similar Threads
How do I get an instance of a Stateless Session EJB deployed alone in Glassfish, from a Servlet?
JNDI Name in EJB3
EJB 3 Local Lookup not working with Weblogic 10.3 and JDK 1.6_05
JNDI not creating for EJB Local interfaces example
Hello world example using EJB 3