I have a Seam component that processes a login with the name "authenticator":
@Name("authenticator") public class AuthenticatorAction implements Authenticator { @PersistenceContext private EntityManager em; @In(required=false) @Out(required=false, scope = SESSION) private User user; public boolean authenticate(){ ... } }
This works fine, Seam introduces an EntityManager instance. However, as soon as I add the @Stateless , none of the injections happen! In this case, the EntityManager instance is null when entering the authenticate() method. Another interesting point is that with a separate session with a bean state I have, a Logger instance in this class is introduced only if I make it static. If I have it non-static, it is not introduced. Thats fine for the registrar, but for a session without beans state like me, I obviously can't have static member variables for these components.
I am confused because this authenticator is exactly the same as in the Seam booking example: a session without a bean with the private member variable entered.
Any ideas?
source share