-
1. Re: Can a custom LoginModule be a stateful ejb?
sfcoy Feb 16, 2012 6:18 PM (in response to pgarner)Patrick Garner wrote:
...
Does this mean that my custom login module can be a stateful ejb? I don't want to use manual transaction demarcation. I am configuring my login module as stateful ejb and when I deploy, the EntityManager does not appear to be injected; I get NullPointerException. Any managed beans that I try to inject are also null.
...
I don't think you can do that as the respective lifecycles of a stateful EJB and a login module are quite different. AFAIK, login modules are created and used for the duration of a single authentication step and then left to be garbage collected.
-
2. Re: Can a custom LoginModule be a stateful ejb?
pgarner Feb 16, 2012 6:37 PM (in response to sfcoy)So, no CDI either? I can't inject a managed bean?
-
3. Re: Can a custom LoginModule be a stateful ejb?
sfcoy Feb 16, 2012 6:42 PM (in response to pgarner)1 of 1 people found this helpfulPatrick Garner wrote:
So, no CDI either? I can't inject a managed bean?
Nope.
It would be cool if it did though. Someone needs to propose an update to the JAAS spec I expect.