wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes ejb 3.0 client in WebLogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "ejb 3.0 client in WebLogic" Watch "ejb 3.0 client in WebLogic" New topic
Author

ejb 3.0 client in WebLogic

Ritesh Patel
Greenhorn

Joined: Feb 06, 2009
Posts: 5
Hi,

I am migrating my existing ejb2.0 project to ejb3.0.
In my project bean is called from a action class and not from servlet.

Now while trying to call my bean via @EJB I am getting NullPointerException.
The same is working fine if I am calling my bean from the servlet using @EJB.

Thanks in Advance.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30356
    
150

Ritesh,
The dependency injection annotations only work from Servlet or EJB classes. You'll need to continue looking up the bean from the JNDI in the action.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ritesh Patel
Greenhorn

Joined: Feb 06, 2009
Posts: 5
Hi Jeanne,

Thanks for your reply.
But in case of using JNDI lookup, I will need to maintain weblogic.xml for the jndi name?
Moreover I will also need to maintain the other DD's which will make the implementation as it was when I was using ejb 2.0

Is there any way out of this??
Hope to get some advise.

Thanks once again.

Regards,
Ritesh
Ritesh Patel
Greenhorn

Joined: Feb 06, 2009
Posts: 5
Hi,

Had been trying to call my ejb 3.0, but am unsuccessful.
Can any body suggest me on the same.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ejb 3.0 client in WebLogic