*
The moose likes Struts and the fly likes Struts2.1.6 & EJB3.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2.1.6 & EJB3.1" Watch "Struts2.1.6 & EJB3.1" New topic
Author

Struts2.1.6 & EJB3.1

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Just wondering very quickly, if anyone has any examples of Struts2 & EJB3.1 working together.

I have tried just Injecting a EJB bean into a Struts Action but I get a NullPointerException

I found another thread on this forum where someone said use somethink like this:


javax.naming.NamingException: Lookup failed for 'com.myproject.bear.session.ITestSessionBean' in SerialContext [Root exception is javax.naming.NameNotFoundException: com.myproject.bear.session.ITestSessionBean not found]|#]

Can it be done and if so, anyone know how?

Cheers in advance

KS
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9280
    
  17

Try this plugin to inject EJBs into your struts 2 actions. This tutorial on use of guice plug-in might also be helpful...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Cheers for that, will do.
Viji San
Ranch Hand

Joined: Aug 12, 2010
Posts: 35
Is this project dead or Am I checking in incorrect link ?? I find no downloads in the link http://code.google.com/p/struts2ejb3/downloads/list

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2.1.6 & EJB3.1
 
Similar Threads
Getting hold of another EJB in an EJB
JNDI look up for data source
context lookup issues
Generate stubs for EJB3.1 bean exposed as webservice
Struts 2.x.x & EJB 3.1 on Glassfish