struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignacio de Córdoba <>
Subject Re: [Struts 2 + EJB 3] injection of EJBs into struts 2 actions
Date Mon, 07 Dec 2009 20:40:08 GMT

Which  appserver are you using?
I use JBoss for struts2 plugin. I hace to modifyit as it didn't support
JBoss 5 naming conventions (at least for me) and it only looked for
annotations in current class, so if you injected a Session Bean in a
super.execute() method in a parent class, it was not looked up.

Anyway, I am considering moving to EJB 3.1 and hope I can find a new way of
injecting new EJBs...

Fernandes Celinio wrote:
> Hi,
> I know that it is not possible to inject EJB in Struts 2 actions.
> The following annotation would not work :
> @EJB
> MyBeanLocal mybean;
> But how come ? Since a Struts action is a servlet and injection works in
> a servlet, injection should work.
> Thanks for enlightening me.

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message