Hi 2017-02-06 22:12 GMT+01:00 Tamás Kimmel <[email protected]>:
> 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 > >
