Description
The latest TomEE build detects disabled beans as broken and reports a Serialization check issue.
org.apache.webbeans.exception.WebBeansConfigurationException: Passivation scoped defined bean must be passivation capable, but bean : TissClientConfig, Name:null, WebBeans Type:MANAGED, API Types:[org.apache.myfaces.extensions.cdi.jsf.api.config.ClientConfig,at.ac.tuwien.tiss.core.fe.codi.TissClientConfig,java.io.Serializable,java.lang.Object], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default] is not passivation capable
at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:392)
at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:253)
at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:215)
at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:286)
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:108)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:50)
The bean looks like the following:
@SessionScoped
@Alternative
public class TissClientConfig extends ClientConfig implements Serializable {
The problem is that in my case the Alternative is not enabled via beans.xml. Thus it is disabled, in which case the WebBeansUtil#isPassivationCapable(Contextual<?> contextual) returns null.
This works as documented:
> @return the uniqueId if it is
and enabled
The solution: Someone removed the following lines from the class you copied from owb to openejb:
if (bean instanceof OwbBean && !((OwbBean)bean).isEnabled())
{
// we skip disabled beans
continue;
}
Disabled beans do not need to be valid in a CDI sense at all. That might be the reason why they got disabled during the boot.
I will provide a patch to fix this. Just doing some 7up and testing.