[webbeans-commits] Webbeans SVN: r3562 - ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Wed Aug 19 15:13:50 EDT 2009
Author: dallen6
Date: 2009-08-19 15:13:50 -0400 (Wed, 19 Aug 2009)
New Revision: 3562
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java
Log:
Added code to create the ProcessObserverMethod events
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java 2009-08-19 15:01:33 UTC (rev 3561)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bootstrap/AbstractBeanDeployer.java 2009-08-19 19:13:50 UTC (rev 3562)
@@ -24,6 +24,11 @@
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Initializer;
import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.InjectionTarget;
+import javax.enterprise.inject.spi.ObserverMethod;
+import javax.enterprise.inject.spi.ProcessObserverMethod;
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.bean.AbstractClassBean;
@@ -88,7 +93,10 @@
for (ObserverMethodImpl<?, ?> observer : getEnvironment().getObservers())
{
log.debug("Observer : " + observer);
- observer.initialize();
+ if (observer instanceof ObserverMethodImpl<?, ?>)
+ {
+ observer.initialize();
+ }
manager.addObserver(observer);
}
@@ -163,9 +171,15 @@
protected void createObserverMethod(RIBean<?> declaringBean, WBMethod<?, ?> method)
{
ObserverMethodImpl<?, ?> observer = ObserverFactory.create(method, declaringBean, manager);
+ //ProcessObserverMethod<?, ?> event = createProcessObserverMethodEvent(observer, method);
getEnvironment().addObserver(observer);
}
+ private <X, T> ProcessObserverMethod<X, T> createProcessObserverMethodEvent(ObserverMethod<X, T> observer, AnnotatedMethod<X> method)
+ {
+ return new ProcessObserverMethodImpl<X, T>(method, observer, definitionErrors) {};
+ }
+
protected <T> void createSimpleBean(WBClass<T> annotatedClass)
{
SimpleBean<T> bean = SimpleBean.of(annotatedClass, manager);
More information about the weld-commits
mailing list