openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1641652 - /openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
Date Tue, 25 Nov 2014 16:47:26 GMT
Author: rmannibucau
Date: Tue Nov 25 16:47:25 2014
New Revision: 1641652

URL: http://svn.apache.org/r1641652
Log:
ejb producer are handled by EJB container so skip it

Modified:
    openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java

Modified: openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
URL: http://svn.apache.org/viewvc/openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java?rev=1641652&r1=1641651&r2=1641652&view=diff
==============================================================================
--- openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
(original)
+++ openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
Tue Nov 25 16:47:25 2014
@@ -840,14 +840,13 @@ public class BeansDeployer
 
     protected void removeProducersInDisabledBeans()
     {
-        Iterator<Bean<?>> beanIterator = webBeansContext.getBeanManagerImpl().getBeans().iterator();
-        while (beanIterator.hasNext())
+        for (final Bean<?> bean : webBeansContext.getBeanManagerImpl().getBeans())
         {
-            Bean<?> bean = beanIterator.next();
             if (bean instanceof AbstractProducerBean)
             {
-                AbstractProducerBean<?> producerBean = (AbstractProducerBean<?>)
bean;
-                if (!producerBean.getOwnerBean().isEnabled())
+                final AbstractProducerBean<?> producerBean = (AbstractProducerBean<?>)
bean;
+                final InjectionTargetBean<?> ownerBean = producerBean.getOwnerBean();
+                if (!ownerBean.isEnabled() && !EnterpriseBeanMarker.class.isInstance(ownerBean))
                 {
                     // if the parent component is disabled, then we also need to disabled
the producer fields and methods in it as well.
                     producerBean.setEnabled(false);



Mime
View raw message