This content has been marked as final.
Show 5 replies
-
1. Re: parameter injection
swd847 Nov 20, 2009 12:48 AM (in response to asookazian)Where else is the parameter going to come from? The method is being invoked by the container, so the container could either pass in null (which is kind of useless) or inject the parameter.
-
2. Re: parameter injection
asookazian Nov 20, 2009 12:57 AM (in response to asookazian)Ok, but can a client (e.g. session bean) call that method as well? Sorry for the stupid questions...
Or are @Produces provider methods only called by the container?
-
3. Re: parameter injection
swd847 Nov 20, 2009 1:01 AM (in response to asookazian)Anything can call it, it is a POJO, in which case the parameter is not injected.
-
4. Re: parameter injection
asookazian Nov 20, 2009 1:08 AM (in response to asookazian)where is the value injected from if the container calls the producer method? From a scope or what?
-
5. Re: parameter injection
nickarls Nov 20, 2009 7:52 AM (in response to asookazian)From the same place as if you would have a field
@Inject private ShoppingCart cart
That is, the context of the scope of the ShoppingCart