[weld-dev] Passivating Capabilities check.
Mark Struberg
struberg at yahoo.de
Tue Feb 16 05:11:37 EST 2010
Hi!
I'm just curious how Weld manages to inject a Logger into a @SessionScoped (passivating!) bean.
In your example in 1.3.5 you wrote:
>class Loggers {
> @Produces Logger getLogger(InjectionPoint injectionPoint) {
> return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getSimpleName() );
> }
>}
and
>@SessionScoped
>public class Permissions implements Serializable {
> @Inject Logger log;
> ...
but the Logger I know are actually not Serializable themselfs and since it is @Dependent scoped, we also don't use a proxy for it.
I'd expected a DeploymentException thrown at startup in this case, but Weld actually seems to only checks passivation stuff for NormalBeans. Anyway, once the session get's passivated, you'll see a fine NotSerializableException.
Have I missed something?
txs and LieGrue,
strub
__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com
More information about the weld-dev
mailing list