-
1. Re: Identity not injected into Stateful bean
stu2 May 17, 2007 2:16 PM (in response to michael.c.small)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?
-
2. Re: Identity not injected into Stateful bean
monkeyden May 17, 2007 2:31 PM (in response to michael.c.small)@Statefull has one "L"
-
3. Re: Identity not injected into Stateful bean
michael.c.small May 17, 2007 2:59 PM (in response to michael.c.small)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. -
4. Re: Identity not injected into Stateful bean
michael.c.small May 17, 2007 3:02 PM (in response to michael.c.small)One other thing, I did try just injecting Identity using:
@In public void setIdentity(Identity identity) ...
and@In private Identity identity;
Neither worked. -
5. Re: Identity not injected into Stateful bean
monkeyden May 17, 2007 3:10 PM (in response to michael.c.small)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.
-
6. Re: Identity not injected into Stateful bean
michael.c.small May 17, 2007 3:17 PM (in response to michael.c.small)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. -
7. Re: Identity not injected into Stateful bean
vralev May 17, 2007 3:28 PM (in response to michael.c.small)What happens when you try to get the Identity with:
Identity.instance()
instead of injection? -
8. Re: Identity not injected into Stateful bean
michael.c.small May 17, 2007 3:41 PM (in response to michael.c.small)Using Identity.instance() works (that's how I'm working around the problem now), but I would prefer that the values be injected.
-
9. Re: Identity not injected into Stateful bean
monkeyden May 17, 2007 5:11 PM (in response to michael.c.small)Did you try
@In Identity identity;
It's still injection. :)