openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Beans and PassivationCapable
Date Tue, 07 Feb 2017 07:56:56 GMT
Hi

2017-02-06 22:12 GMT+01:00 Tamás Kimmel <kumm0307@gmail.com>:

> Hi.
>
> I'm experimenting with a custom cdi context.
> I've found all Beans for non-Serializable classes are PassivationCapable (
> org.apache.webbeans.component.ManagedBean).
> getId returns an id, and beanManager.getPassivationCapableBean works on
> it.
> - checked Weld, and works same too -
> Are there any circumstances a Bean not instance of PassivationCapable?
>
>
If not serializable for instance or its graph (with interceptors etc) is
not.


> Is it something i can rely on?
>

What's the intent? This kind of implementation is kind of required by CDI


> For example use the passivation id for key in my contextual storage even
> for beans with non-serializable beanClasses.
> I know bean classes, interceptors, and decorators have to be Serializable
> for a working passivation.
>
>
If you have a multi scope storage no otherwise yes but keep in mind this is
for specific scopes and not all so depends your Context implementation and
scope definition.


> Thanks in advance,
> Kimmel Tamás
>
>

Mime
View raw message