struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Schulte <>
Subject EJB Injection in Interceptor
Date Thu, 16 Jul 2009 20:03:55 GMT
This may be more related to XWork2, but I'll start by asking here.

I'm creating a custom Interceptor to handle user permissions for an application.
 Rather than redirecting to an action to actually process a login attempt
(requiring a custom result type), the Interceptor itself will process the login
attempt.  However, in order for this to work, the Interceptor needs access to a
session bean that is the interface to the persistence layer.

Is it possible to use the Java EE 5 @EJB annotation to inject an EJB, or even
the Inject EJB Plugin?  I've tried both, and neither seem to work (both result
in a null object reference).  I realize I can use a JNDI lookup to get a
reference to the bean, but I would much rather use injection if possible, as
that's why it's there.


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

View raw message