-
Bug
-
Resolution: Done
-
Major
-
2.0.0.Beta6
-
None
-
None
consider the following startup extension that replicate the ejb @Singleton @Startup behavior :
public class StartupExtension implements Extension
{
private final Set<Bean<?>> startupBeans = new LinkedHashSet<Bean<?>>();
<X> void processBean(@Observes ProcessBean<X> event)
{
if (event.getAnnotated().isAnnotationPresent(Startup.class) &&
event.getAnnotated().isAnnotationPresent(ApplicationScoped.class))
}
void afterDeploymentValidation(@Observes AfterDeploymentValidation event, BeanManager manager)
{
for (Bean<?> bean : startupBeans)
}
}
in weld 2.0.0.Beta6 it will lead in an new IllegalStateException(METHOD_NOT_AVAILABLE_DURING_INITIALIZATION, methodName) exception (BeanManagerProxy::checkContainerInitialized)
though as https://issues.jboss.org/browse/CDI-315 suggests, it should not.