my dog learned polymorphism*
The moose likes Struts and the fly likes A Query about accessing EJB from my Struts2 Action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "A Query about accessing EJB from my Struts2 Action class " Watch "A Query about accessing EJB from my Struts2 Action class " New topic
Author

A Query about accessing EJB from my Struts2 Action class

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi

In response to my question i got a answer like this

I am trying to communicate with EJB from my execute Method of the Action class
Please let me know i am using Weblogic11g and struts2 will The injection @EJB will work inside the Actiion class ??


Answer which i got is :

Dependency injection in the web tier is only allowed in classes managed by the container, such as Servlets, Listeners and also allows it in JSF managed beans.


Please tell me if the Action class is not managed by the Container , who manages it ??

THnaks in advance .


Save India From Corruption - Anna Hazare.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

1. In response to this thread of yours, there were two plugins that I mentioned, one of them is Jboss specific, the other one can be used on any application server.

2. A struts 2 action is maintained by the struts framework...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thank you Ankit .
 
Consider Paul's rocket mass heater.
 
subject: A Query about accessing EJB from my Struts2 Action class
 
Similar Threads
Struts2 - Json problem
Struts2 - Json issue, InvocationTargetException
Struts2 - Dependency Injection inside the Struts2 Action class
struts2
JAAS with Struts2