Andrzej K created OWB-1133:
------------------------------
Summary: Container lifecycle events are observed by non-Extension
classes
Key: OWB-1133
URL: https://issues.apache.org/jira/browse/OWB-1133
Project: OpenWebBeans
Issue Type: Bug
Components: Events
Affects Versions: 1.2.8
Reporter: Andrzej K
Because of erroneus usages of method fireEvent (where fireLifecycleEvent should
be) if a situation as described below holds, an error is generated.
When:
-bean A depends on bean B and C
-bean A declares observer method with parameters @Observes Object event (which
means, that it observes all events)
There is (sometimes, it depends on a classpath) a deployment error because A
cannot be built if B and C were not analyzed from the classpath. A should be
build, because a containter wants to fire an event ProcessObserverMethod. The
problem is, that this event is a lifecycle event and it should be never fired
to bean A which is not Extension specialization (however v. 1.2.8 does it --
incorrectly).
The observation is done according to 11.5 of CDI 1.0 specs which clearly states
that: "Observer methods of these events must belong to
extensions". The events are Lifecycle events.
AFAIK it is a problem in class org.apache.webbeans.util.WebBeansUtil, where
methods firing lifecycle events (e.g fireProcessObservableMethodBeanEvent) uses
method fireEvent instead of fireLifecycleEvent (from class BeanManagerImpl).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)