openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1681659 - in /openwebbeans/trunk: webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansJavaEEPlugin.java
Date Mon, 25 May 2015 22:02:34 GMT
Author: struberg
Date: Mon May 25 22:02:33 2015
New Revision: 1681659

URL: http://svn.apache.org/r1681659
Log:
OWB-851 improve registration of EE beans

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
    openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansJavaEEPlugin.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java?rev=1681659&r1=1681658&r2=1681659&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
Mon May 25 22:02:33 2015
@@ -74,7 +74,6 @@ import org.apache.webbeans.spi.BeanArchi
 import org.apache.webbeans.spi.JNDIService;
 import org.apache.webbeans.spi.ScannerService;
 import org.apache.webbeans.spi.plugins.OpenWebBeansJavaEEPlugin;
-import org.apache.webbeans.spi.plugins.OpenWebBeansWebPlugin;
 import org.apache.webbeans.util.AnnotationUtil;
 import org.apache.webbeans.util.ClassUtil;
 import org.apache.webbeans.util.ExceptionUtil;
@@ -533,17 +532,10 @@ public class BeansDeployer
         
         //REgister Provider Beans
         OpenWebBeansJavaEEPlugin beanEeProvider = webBeansContext.getPluginLoader().getJavaEEPlugin();
-        OpenWebBeansWebPlugin beanWebProvider = webBeansContext.getPluginLoader().getWebPlugin();
-        
+
         if(beanEeProvider != null)
         {
-            addDefaultBean(webBeansContext, "org.apache.webbeans.ee.beans.ValidatorBean");
-            addDefaultBean(webBeansContext, "org.apache.webbeans.ee.beans.ValidatorFactoryBean");
-            addDefaultBean(webBeansContext, "org.apache.webbeans.ee.beans.UserTransactionBean");
-        }
-        else if(beanWebProvider != null)
-        {
-            addDefaultBean(webBeansContext, "org.apache.webbeans.ee.common.beans.PrincipalBean");
+            beanEeProvider.registerEEBeans();
         }
             
     }

Modified: openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansJavaEEPlugin.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansJavaEEPlugin.java?rev=1681659&r1=1681658&r2=1681659&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansJavaEEPlugin.java
(original)
+++ openwebbeans/trunk/webbeans-spi/src/main/java/org/apache/webbeans/spi/plugins/OpenWebBeansJavaEEPlugin.java
Mon May 25 22:02:33 2015
@@ -31,4 +31,10 @@ package org.apache.webbeans.spi.plugins;
 public interface OpenWebBeansJavaEEPlugin extends OpenWebBeansPlugin
 {
     boolean isEEComponent(Class<?> impl);
+
+    /**
+     * Gets invoked when the EE integration should register it's
+     * CDI Beans. E.g. ValidatorBean, PrincipalBean, etc
+     */
+    void registerEEBeans();
 }



Mime
View raw message