I don't know the answer to your question - I haven't tried injecting portions of components like that. But I do wonder why you'd want the authenticator implementation to be a sfsb rather than just a pojo. Its lifetime is the scope of the event only, so conversational scope isn't an issue, right?
@Statefull has one "L"
Sorry, Statefull was a typo in my post ... the actual code is correct.
Regarding why I'm using a Stateful bean (or Stateless), I'd like to use the @EJB injection functionality to call back end Stateless services to perform the authentication against the database. If I make this a POJO, I can't do that.
One other thing, I did try just injecting Identity using:
@In public void setIdentity(Identity identity) ...
@In private Identity identity;
Did you annotate Authenticator with @Local? I don't know if @Local(Authenticator.class) in the bean class is a replacement for @Local in the business interface.
I tried your suggestion of moving the @Local from the implementation to the interface, but no dice.
Note that injection elsewhere in my application (using POJOs, Stateful, and Stateless beans) works just fine. The problem is only limited to simply Seam Authentication.
What happens when you try to get the Identity with:
instead of injection?
Using Identity.instance() works (that's how I'm working around the problem now), but I would prefer that the values be injected.
Did you try
@In Identity identity;
It's still injection. :)