![]() |
|
|
|
|
Issue Type:
|
Feature Request
|
|
Affects Versions:
|
2.0.0.Beta6 |
|
Assignee:
|
Jozef Hartinger
|
|
Created:
|
19/Mar/13 7:32 PM
|
|
Description:
|
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))
{
startupBeans.add(event.getBean());
}
}
void afterDeploymentValidation(@Observes AfterDeploymentValidation event, BeanManager manager)
{
for (Bean<?> bean : startupBeans)
{
// the call to toString() is a cheat to force the bean to be initialized
manager.getReference(bean, bean.getBeanClass(), manager.createCreationalContext(bean)).toString();
}
}
}
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.
|
|
Project:
|
Weld
|
|
Priority:
|
Major
|
|
Reporter:
|
Mathieu Lachance
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
_______________________________________________
weld-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-issues