[
https://issues.jboss.org/browse/DROOLS-584?page=com.atlassian.jira.plugin...
]
Antoine Toulme updated DROOLS-584:
----------------------------------
Description:
Looking at CDIHelper, on line 96, it caches a static beanCreator. The beanCreator is
created based on JNDI lookups for CDI BeanManager.
The JNDI lookup returns null however, in the situation where the system just started out,
especially when the system is modular. For example Wildfly 8.1 will create such a
situation.
In the event that the BeanManager is not there, the default implementation of using a
reflection approach is used instead, which transparently masks the problem.
However, if the bean created relies on CDI to inject fields, it becomes problematic.
A few recommendations:
-do not cache the beanCreator. Recreate it every time, at the cost of making several JNDI
lookups.
-use DeltaSpike, longer term plan to remove this code.
CDIHelper caches JNDI lookup early on, missing on
java:comp/BeanManager
-----------------------------------------------------------------------
Key: DROOLS-584
URL:
https://issues.jboss.org/browse/DROOLS-584
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 6.1.0.Final, 6.2.0.Beta1
Reporter: Antoine Toulme
Assignee: Mark Proctor
Looking at CDIHelper, on line 96, it caches a static beanCreator. The beanCreator is
created based on JNDI lookups for CDI BeanManager.
The JNDI lookup returns null however, in the situation where the system just started out,
especially when the system is modular. For example Wildfly 8.1 will create such a
situation.
In the event that the BeanManager is not there, the default implementation of using a
reflection approach is used instead, which transparently masks the problem.
However, if the bean created relies on CDI to inject fields, it becomes problematic.
A few recommendations:
-do not cache the beanCreator. Recreate it every time, at the cost of making several JNDI
lookups.
-use DeltaSpike, longer term plan to remove this code.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)