Main motivation was that: Bean creators are used for creating the beans. And if InjectionTargets/Producers are set by the observers, AbstractInjectionTargetBean or AbstractProducerBean uses final objects to produce bean artifacts.
But there is an error/mistake in current code base in regard to 3Party overriden. If observer(ProcessInjectionTarget) wraps the original InjectionTarget, then StackOverFlow occurs. Becuase in current code base AbstractInjectionTargetBean # getInjectionPoints --> AbstractBeanCreator # getInjectionPoints --> producer # getInjectionPoints And if "producer" wraps original injection target like this, ProducerInjectionTarget implement InjectionTarget { InjectionTarget wrapped .... public Set getInjectionPoints() { wrapped.getInjectionPoints(); } } Then producer # getInjectionPoints agains calls AbstractInjectionTargetBean # getInjectionPoints to infinitely. Therefore I have commented out below producer. I will look for further errors. Thanks; --Gurkan ________________________________ From: Eric Covener <cove...@gmail.com> To: dev@openwebbeans.apache.org Sent: Sun, March 21, 2010 1:43:51 AM Subject: Re: svn commit: r923435 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: component/ component/creation/ config/ container/ decorator/ intercept/ portable/events/discovery/ util/ On Mon, Mar 15, 2010 at 4:54 PM, <gerdo...@apache.org> wrote: > Author: gerdogdu > Date: Mon Mar 15 20:54:43 2010 > New Revision: 923435 > Modified: > openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectedTargetBeanCreator.java > URL: > http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectedTargetBeanCreator.java?rev=923435&r1=923434&r2=923435&view=diff > ============================================================================== > --- > openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectedTargetBeanCreator.java > (original) > +++ > openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/creation/AbstractInjectedTargetBeanCreator.java > Mon Mar 15 20:54:43 2010 > @@ -183,6 +183,7 @@ public abstract class AbstractInjectedTa > { > this.injectionTarget = injectionTarget; > this.injectionTargetSet = true; > + //super.setProducer(injectionTarget); > } I was looking at something in this neighborhood, Is AbstractBeanCreator.producer() really just for third-party provided impl registered via the event? Why does e.g. AbstractBeanCreator.getInjectionPoint() and getProducer() seem to expect this to always be available? In similar vein, AbstractInjectedTargetBeanCreator.setInjectedTarget() is only called when some third-party observer has reset it? My TCK env still gets ~240 errors so I maybe missing something in the setup, but I see this backtrace during deployment: SEVERE: Exception sending context initialized event to listener instance of class org.apache.webbeans.servlet.WebBeansConfigurationListener Throwable occurred: java.lang.NullPointerException at org.apache.webbeans.component.creation.AbstractBeanCreator.getInjectionPoints(AbstractBeanCreator.java:259) at org.apache.webbeans.component.AbstractInjectionTargetBean.getInjectionPoints(AbstractInjectionTargetBean.java:621) at org.apache.webbeans.util.WebBeansUtil.createNewBean(WebBeansUtil.java:698) at org.apache.webbeans.util.WebBeansUtil.defineManagedBean(WebBeansUtil.java:2915) at org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:680) at org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:387) at org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:146) at org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:120) at org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:75) at org.apache.webbeans.servlet.WebBeansConfigurationListener.contextInitialized(WebBeansConfigurationListener.java:66) I am arbitrarily onorg.jboss.jsr299.tck.tests.extensions.producer.ProducerTest.testDisposeDoesNothing -- Eric Covener cove...@gmail.com ___________________________________________________________________ Yahoo! Türkiye açıldı! http://yahoo.com.tr İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor!