geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1150989 - in /geronimo/server/trunk/plugins: openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/ openejb/openejb/src/main/filtered-resources/etc/ openwebbeans/openwebbeans-deployer/src/main/plan/ tomcat/geronimo-tomcat7/
Date Tue, 26 Jul 2011 05:46:01 GMT
Author: genspring
Date: Tue Jul 26 05:45:59 2011
New Revision: 1150989

URL: http://svn.apache.org/viewvc?rev=1150989&view=rev
Log:
GERONIMO-5893 only to add openwebbeans-jsf dependencies when there's webbeans in app.

Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/OpenWebBeansWebInitializer.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/ThreadSingletonServiceAdapter.java
    geronimo/server/trunk/plugins/openejb/openejb/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
    geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/pom.xml

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/OpenWebBeansWebInitializer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/OpenWebBeansWebInitializer.java?rev=1150989&r1=1150988&r2=1150989&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/OpenWebBeansWebInitializer.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/OpenWebBeansWebInitializer.java
Tue Jul 26 05:45:59 2011
@@ -38,7 +38,7 @@ import org.apache.openejb.loader.SystemI
 import org.apache.webbeans.config.OpenWebBeansConfiguration;
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.el.el22.EL22Adaptor;
-import org.apache.webbeans.jsf.DefaultConversationService;
+import org.apache.webbeans.logger.WebBeansLogger;
 import org.apache.webbeans.spi.ContainerLifecycle;
 import org.apache.webbeans.spi.ContextsService;
 import org.apache.webbeans.spi.ConversationService;
@@ -55,6 +55,9 @@ import org.apache.webbeans.util.WebBeans
  * @version $Rev: 698441 $ $Date: 2008-09-24 00:10:08 -0700 (Wed, 24 Sep 2008) $
  */
 public class OpenWebBeansWebInitializer {
+    
+    /**Logger instance*/
+    private static final WebBeansLogger logger = WebBeansLogger.getLogger(OpenWebBeansWebInitializer.class);
 
     public static WebBeansContext newWebBeansContext(Object startup) {
         Properties properties = new Properties();
@@ -72,7 +75,17 @@ public class OpenWebBeansWebInitializer 
         services.put(TransactionService.class, new OpenEJBTransactionService());
         services.put(JNDIService.class, new NoopJndiService());
         services.put(ELAdaptor.class, new EL22Adaptor());
-        services.put(ConversationService.class, new DefaultConversationService());
+        
+        if (startup != null && startup instanceof StartupObject){
+            
+            ClassLoader cl=((StartupObject)startup).getAppContext().getClassLoader();
+            try {
+                services.put(ConversationService.class, Class.forName("org.apache.webbeans.jsf.DefaultConversationService",
true, cl).newInstance());
+            } catch (Exception e1) {
+                logger.info("openWebbeans-jsf is not in the classpath because the app does
not contain webbean, conversationService will not be available.");
+            }
+        }
+  
         services.put(ContextsService.class, new CdiAppContextsService(true));
         services.put(ResourceInjectionService.class, new CdiResourceInjectionService());
         services.put(ScannerService.class, new CdiScanner());

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/ThreadSingletonServiceAdapter.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/ThreadSingletonServiceAdapter.java?rev=1150989&r1=1150988&r2=1150989&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/ThreadSingletonServiceAdapter.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/ThreadSingletonServiceAdapter.java
Tue Jul 26 05:45:59 2011
@@ -19,31 +19,10 @@
 
 
 package org.apache.geronimo.openejb.cdi;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.openejb.cdi.CdiAppContextsService;
-import org.apache.openejb.cdi.CdiResourceInjectionService;
-import org.apache.openejb.cdi.OpenEJBLifecycle;
-import org.apache.openejb.cdi.OpenEJBTransactionService;
 import org.apache.openejb.cdi.StartupObject;
 import org.apache.openejb.cdi.ThreadSingletonService;
-import org.apache.webbeans.config.OpenWebBeansConfiguration;
 import org.apache.webbeans.config.WebBeansContext;
-import org.apache.webbeans.el.el22.EL22Adaptor;
-import org.apache.webbeans.jsf.DefaultConversationService;
-import org.apache.webbeans.spi.ContainerLifecycle;
-import org.apache.webbeans.spi.ContextsService;
-import org.apache.webbeans.spi.ConversationService;
-import org.apache.webbeans.spi.JNDIService;
-import org.apache.webbeans.spi.ResourceInjectionService;
-import org.apache.webbeans.spi.ScannerService;
-import org.apache.webbeans.spi.SecurityService;
-import org.apache.webbeans.spi.TransactionService;
-import org.apache.webbeans.spi.ValidatorService;
-import org.apache.webbeans.spi.adaptor.ELAdaptor;
+
 
 /**
  * @version $Rev$ $Date$

Modified: geronimo/server/trunk/plugins/openejb/openejb/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/openejb/src/main/filtered-resources/etc/org.apache.karaf.features.cfg?rev=1150989&r1=1150988&r2=1150989&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/openejb/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
(original)
+++ geronimo/server/trunk/plugins/openejb/openejb/src/main/filtered-resources/etc/org.apache.karaf.features.cfg
Tue Jul 26 05:45:59 2011
@@ -25,5 +25,5 @@ featuresRepositories=mvn:org.apache.gero
 #
 # Comma separated list of features to install at startup
 #
-featuresBoot=specs-feature,quartz-feature,openejb-feature
+#  featuresBoot=specs-feature,quartz-feature,openejb-feature
 #  config,ssh,management

Modified: geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml?rev=1150989&r1=1150988&r2=1150989&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml
(original)
+++ geronimo/server/trunk/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml
Tue Jul 26 05:45:59 2011
@@ -73,6 +73,7 @@
                     <dependency>
                         <groupId>org.apache.openwebbeans</groupId>
                         <artifactId>openwebbeans-jsf</artifactId>
+                        <type>jar</type>
                     </dependency>
                 </dependencies>
                <!-- Import added so that MyFaces can discover 

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/pom.xml?rev=1150989&r1=1150988&r2=1150989&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/pom.xml (original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/pom.xml Tue Jul 26 05:45:59 2011
@@ -69,12 +69,12 @@
             <artifactId>openejb-core</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
+        <!-- dependency>
             <groupId>org.apache.openwebbeans</groupId>
             <artifactId>openwebbeans-jsf</artifactId>
             <version>${openwebbeansVersion}</version>
             <scope>test</scope>
-        </dependency>
+        </dependency-->
         <dependency>
             <groupId>org.apache.openwebbeans</groupId>
             <artifactId>openwebbeans-web</artifactId>



Mime
View raw message