geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1213810 [4/6] - in /geronimo/server/branches/3.0-beta: ./ framework/ framework/configs/karaf-framework/src/main/distribution/text/ framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/ framework/configs/karaf-framework/sr...
Date Tue, 13 Dec 2011 18:00:12 GMT
Modified: geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee-builder/src/main/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java Tue Dec 13 18:00:08 2011
@@ -624,6 +624,7 @@ public class EARConfigBuilder implements
                     String entryName = entry.getName();
                     //   EAR/lib/sub-dir/*.jar should not be added into lib classpath.
                     if (libDir != null && entry.getName().startsWith(libDir) && entry.getName().endsWith(".jar") && entry.getName().substring(libDir.length()+1).indexOf("/") == -1) {
+                        JarUtils.assertTempFile();
                         NestedJarFile library = new NestedJarFile(earFile, entry.getName());
                         earContext.addIncludeAsPackedJar(URI.create(entry.getName()), library);
                         libClasspath.add(entry.getName());
@@ -921,6 +922,7 @@ public class EARConfigBuilder implements
 
                         NestedJarFile moduleFile;
                         try {
+                            JarUtils.assertTempFile();
                             moduleFile = new NestedJarFile(earFile, modulePath);
                         } catch (IOException e) {
                             throw new DeploymentException("Invalid moduleFile: " + modulePath, e);
@@ -964,6 +966,7 @@ public class EARConfigBuilder implements
                             moduleTypeName = "a connector";
                         } else if (entry.getName().endsWith(".jar") && !isLibraryEntry(application, entry)) {
                             try {
+                                JarUtils.assertTempFile();
                                 NestedJarFile moduleFile = new NestedJarFile(earFile, entry.getName());
                                 Manifest mf = moduleFile.getManifest();
 
@@ -1008,6 +1011,7 @@ public class EARConfigBuilder implements
 
                         NestedJarFile moduleFile;
                         try {
+                            JarUtils.assertTempFile();
                             moduleFile = new NestedJarFile(earFile, entry.getName());
                         } catch (IOException e) {
                             throw new DeploymentException("Invalid moduleFile: " + entry.getName(), e);
@@ -1090,6 +1094,7 @@ public class EARConfigBuilder implements
                     String modulePath = gerExtModule.getInternalPath().trim();
                     applicationInfo.getModuleLocations().add(modulePath);
                     try {
+                        JarUtils.assertTempFile();
                         moduleFile = new NestedJarFile(earFile, modulePath);
                     } catch (IOException e) {
                         throw new DeploymentException("Invalid moduleFile: " + modulePath, e);
@@ -1155,6 +1160,7 @@ public class EARConfigBuilder implements
             ZipEntry entry = entries.nextElement();
             if (entry.getName().endsWith(".jar") && isLibraryEntry(application, entry)) {
                 try {
+                    JarUtils.assertTempFile();
                     NestedJarFile moduleFile = new NestedJarFile(earFile, entry.getName());
 
                     if (moduleFile.getEntry("META-INF/beans.xml") == null) continue;

Modified: geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee/pom.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee/pom.xml (original)
+++ geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee/pom.xml Tue Dec 13 18:00:08 2011
@@ -53,6 +53,13 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.geronimo.framework</groupId>
+            <artifactId>geronimo-transformer</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
             <groupId>org.apache.servicemix.bundles</groupId>
             <artifactId>org.apache.servicemix.bundles.howl</artifactId>
         </dependency>
@@ -61,21 +68,6 @@
             <groupId>org.apache.geronimo.components</groupId>
             <artifactId>geronimo-transaction</artifactId>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.openwebbeans</groupId>
-            <artifactId>openwebbeans-impl</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.openwebbeans</groupId>
-            <artifactId>openwebbeans-spi</artifactId>
-        </dependency>
-        <!--TODO can this be optional? -->
-        <dependency>
-            <groupId>org.apache.geronimo.bundles</groupId>
-            <artifactId>scannotation</artifactId>
-        </dependency>
         
         <dependency>
             <groupId>org.apache.servicemix.bundles</groupId>

Modified: geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/annotation/Holder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/annotation/Holder.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/annotation/Holder.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/annotation/Holder.java Tue Dec 13 18:00:08 2011
@@ -17,7 +17,6 @@
  * under the License.
  */
 
-
 package org.apache.geronimo.j2ee.annotation;
 
 import java.io.Serializable;
@@ -29,11 +28,11 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import javax.naming.Context;
 import javax.naming.NamingException;
 
-import org.apache.webbeans.inject.OWBInjector;
 import org.apache.xbean.recipe.ConstructionException;
 import org.apache.xbean.recipe.ObjectRecipe;
 import org.apache.xbean.recipe.Option;
@@ -44,14 +43,19 @@ import org.slf4j.LoggerFactory;
  * @version $Rev$ $Date$
  */
 public class Holder implements Serializable {
+
     private static final Logger log = LoggerFactory.getLogger(Holder.class);
+
     public static final Holder EMPTY = new Holder() {
     };
 
     private Map<String, Set<Injection>> injectionMap;
+
     private Map<String, LifecycleMethod> postConstruct;
+
     private Map<String, LifecycleMethod> preDestroy;
 
+    private List<Interceptor> interceptors = new CopyOnWriteArrayList<Interceptor>();
 
     public Holder() {
     }
@@ -150,9 +154,7 @@ public class Holder implements Serializa
     }
 
     public boolean isEmpty() {
-        return (injectionMap == null || injectionMap.isEmpty())
-                && (postConstruct == null || postConstruct.isEmpty())
-                && (preDestroy == null || preDestroy.isEmpty());
+        return (injectionMap == null || injectionMap.isEmpty()) && (postConstruct == null || postConstruct.isEmpty()) && (preDestroy == null || preDestroy.isEmpty());
     }
 
     public Object newInstance(String className, ClassLoader classLoader, Context context) throws IllegalAccessException, InstantiationException {
@@ -163,7 +165,7 @@ public class Holder implements Serializa
         try {
             clazz = classLoader.loadClass(className);
         } catch (ClassNotFoundException e) {
-            throw (InstantiationException)new InstantiationException("Can't load class " + className + " in classloader: " + classLoader).initCause(e);
+            throw (InstantiationException) new InstantiationException("Can't load class " + className + " in classloader: " + classLoader).initCause(e);
         }
         List<NamingException> problems = new ArrayList<NamingException>();
         while (clazz != Object.class) {
@@ -177,14 +179,15 @@ public class Holder implements Serializa
         try {
             result = objectRecipe.create(classLoader);
         } catch (ConstructionException e) {
-            throw (InstantiationException)new InstantiationException("Could not construct object").initCause(e);
+            throw (InstantiationException) new InstantiationException("Could not construct object").initCause(e);
         }
-        // TODO we likely don't want to create a new one each time -- investigate the destroy() method
-        OWBInjector beanInjector = new OWBInjector();
+        InvocationContext invocationContext = new InvocationContext(context, result);
         try {
-            beanInjector.inject(result);
-        } catch (Exception e) {
-            throw (InstantiationException)new InstantiationException("web beans injection problem").initCause(e);
+            for (Interceptor interceptor : interceptors) {
+                interceptor.instancerCreated(invocationContext);
+            }
+        } catch (InterceptorException e) {
+            throw (InstantiationException) new InstantiationException("Interceptor invocation failed").initCause(e);
         }
 
         if (getPostConstruct() != null) {
@@ -245,4 +248,57 @@ public class Holder implements Serializa
         }
     }
 
+    public boolean addInterceptor(Interceptor interceptor) {
+        return interceptors.add(interceptor);
+    }
+
+    public boolean removeInterceptor(Interceptor interceptor) {
+        return interceptors.remove(interceptor);
+    }
+
+    public static interface Interceptor {
+
+        public void instancerCreated(InvocationContext context) throws InterceptorException;
+
+        public void instanceDestoryed(InvocationContext context) throws InterceptorException;
+
+        public void postConstructInvoked(InvocationContext context) throws InterceptorException;
+    }
+
+    public static class InterceptorException extends Exception {
+
+        public InterceptorException(Throwable cause) {
+            super(cause);
+        }
+
+        public InterceptorException(String message) {
+            super(message);
+        }
+
+        public InterceptorException(String message, Throwable cause) {
+            super(message, cause);
+        }
+
+    }
+
+    public static class InvocationContext {
+
+        private final Context context;
+
+        private final Object instance;
+
+        public InvocationContext(Context context, Object instance) {
+            this.context = context;
+            this.instance = instance;
+        }
+
+        public Context getContext() {
+            return context;
+
+        }
+
+        public Object getInstance() {
+            return instance;
+        }
+    }
 }

Modified: geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/management/impl/JVMImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/management/impl/JVMImpl.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/management/impl/JVMImpl.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-j2ee/src/main/java/org/apache/geronimo/j2ee/management/impl/JVMImpl.java Tue Dec 13 18:00:08 2011
@@ -40,6 +40,7 @@ import org.apache.geronimo.management.ge
 import org.apache.geronimo.management.stats.BoundedRangeStatisticImpl;
 import org.apache.geronimo.management.stats.CountStatisticImpl;
 import org.apache.geronimo.management.stats.JVMStatsImpl;
+import org.apache.geronimo.transformer.TransformerAgent;
 import org.apache.geronimo.logging.SystemLog;
 
 /**
@@ -202,7 +203,11 @@ public class JVMImpl implements JVM, Sta
     public SystemLog getSystemLog() {
         return systemLog;
     }
-
+    
+    public boolean isRedefineClassesSupported() {
+        return TransformerAgent.isRedefineClassesSupported();
+    }
+    
     public static final GBeanInfo GBEAN_INFO;
 
     static {

Modified: geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/MergeHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/MergeHelper.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/MergeHelper.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/MergeHelper.java Tue Dec 13 18:00:08 2011
@@ -47,13 +47,13 @@ import javax.xml.parsers.ParserConfigura
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.Module;
-import org.apache.geronimo.j2ee.deployment.util.CircularReferencesException;
-import org.apache.geronimo.j2ee.deployment.util.FragmentSortUtils;
-import org.apache.geronimo.j2ee.deployment.util.FragmentSortUtils.Visitor;
-import org.apache.geronimo.j2ee.deployment.util.IllegalConfigurationException;
+import org.apache.geronimo.kernel.util.CircularReferencesException;
 import org.apache.geronimo.kernel.util.IOUtils;
+import org.apache.geronimo.kernel.util.IllegalNodeConfigException;
 import org.apache.geronimo.kernel.util.JoinUtils;
 import org.apache.geronimo.kernel.util.JoinUtils.NameCallback;
+import org.apache.geronimo.kernel.util.SortUtils;
+import org.apache.geronimo.kernel.util.SortUtils.Visitor;
 import org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder;
 import org.apache.geronimo.web25.deployment.merge.annotation.AnnotationMergeHandler;
 import org.apache.geronimo.web25.deployment.merge.annotation.ServletSecurityAnnotationMergeHandler;
@@ -422,7 +422,7 @@ public class MergeHelper {
     public static WebFragmentEntry[] relativeOrderWebFragments(EARContext earContext, Module module, Bundle bundle, WebApp webApp, Map<String, WebFragmentEntry> webFragmentEntryMap)
             throws DeploymentException {
         try {
-            WebFragmentEntry[] webFragments = FragmentSortUtils.sort(webFragmentEntryMap.values(), new Visitor<WebFragmentEntry>() {
+            WebFragmentEntry[] webFragments = SortUtils.sort(webFragmentEntryMap.values(), new Visitor<WebFragmentEntry>() {
 
                 @Override
                 public boolean afterOthers(WebFragmentEntry entry) {
@@ -480,7 +480,7 @@ public class MergeHelper {
             }).toArray(new WebFragmentEntry[webFragmentEntryMap.values().size()]);
             saveOrderedLibAttribute(earContext, module, webFragments);
             return webFragments;
-        } catch (IllegalConfigurationException e) {
+        } catch (IllegalNodeConfigException e) {
             throw new DeploymentException("Jar file " + webFragmentEntryMap.get(e.getNodeName()).getJarURL() + " is not configured correctly for " + e.getMessage(), e);
         } catch (CircularReferencesException e) {
             StringBuilder circularReferenceInfo = new StringBuilder();

Modified: geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebApplicationConstants.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebApplicationConstants.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebApplicationConstants.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebApplicationConstants.java Tue Dec 13 18:00:08 2011
@@ -33,12 +33,14 @@ public class WebApplicationConstants {
     public static final String WEB_APP_INFO = "WEB_APP_INFO";
 
     public static final String WEB_APP_NAME = "WEB_APP_NAME";
-    
+
     public static final String WEB_APPLICATION_STAGE = "org.apache.geronimo.webapplication.stage";
-    
+
     public static final String WEB_APPLICATION_PRODUCTION_STAGE = "PRODUCTION";
-    
+
     public static final String WEB_APPLICATION_DEVELOPMENT_STAGE = "DEVELOPMENT";
-    
+
     public static final String WEB_APPLICATION_GET_REAL_PATH_SUPPORT = "org.apache.geronimo.webapplication.getrealpath.support";
+
+    public static final String WEB_MODULE_LISTENERS = "org.apache.geronimo.webapplication.web_modue_listeners";
 }

Modified: geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java Tue Dec 13 18:00:08 2011
@@ -25,7 +25,6 @@ import java.net.URL;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.LinkedHashSet;
 import java.util.Map;
 import java.util.jar.JarFile;
 
@@ -73,7 +72,6 @@ import org.apache.geronimo.kernel.util.J
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.naming.deployment.GBeanResourceEnvironmentBuilder;
 import org.apache.geronimo.naming.deployment.ResourceEnvironmentSetter;
-import org.apache.geronimo.openejb.cdi.SharedOwbContext;
 import org.apache.geronimo.schema.ElementConverter;
 import org.apache.geronimo.schema.NamespaceElementConverter;
 import org.apache.geronimo.schema.SchemaConversionUtils;
@@ -517,14 +515,14 @@ public class JettyModuleBuilder extends 
                 webModuleData.setAttribute("compactPath", Boolean.TRUE);
             }
 
-            LinkedHashSet<Module<?, ?>> submodules = module.getModules();
+            /*LinkedHashSet<Module<?, ?>> submodules = module.getModules();
             for (Module<?, ?> subModule: submodules) {
                 if (subModule.getSharedContext().get(SharedOwbContext.class) != null) {
                     GBeanData data = (GBeanData) subModule.getSharedContext().get(SharedOwbContext.class);
                     AbstractName name = data.getAbstractName();
                     webModuleData.setReferencePattern("SharedOwbContext", name);
                 }
-            }
+            }*/
             //Save Deployment Attributes
             Map<String, Object> deploymentAttributes = new HashMap<String, Object>();
             deploymentAttributes.put(WebApplicationConstants.META_COMPLETE, webApp.isMetadataComplete());

Modified: geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/pom.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/pom.xml (original)
+++ geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/pom.xml Tue Dec 13 18:00:08 2011
@@ -61,12 +61,6 @@
             <artifactId>geronimo-web</artifactId>
             <version>${project.version}</version>
         </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-openejb</artifactId>
-            <version>${project.version}</version>
-        </dependency>
 
         <dependency>
             <groupId>org.apache.openwebbeans</groupId>

Modified: geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/WebAppContextWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/WebAppContextWrapper.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/WebAppContextWrapper.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/WebAppContextWrapper.java Tue Dec 13 18:00:08 2011
@@ -17,10 +17,12 @@
 
 package org.apache.geronimo.jetty8;
 
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -54,15 +56,12 @@ import org.apache.geronimo.management.J2
 import org.apache.geronimo.management.J2EEServer;
 import org.apache.geronimo.management.geronimo.WebContainer;
 import org.apache.geronimo.management.geronimo.WebModule;
-import org.apache.geronimo.openejb.cdi.OpenWebBeansWebInitializer;
-import org.apache.geronimo.openejb.cdi.SharedOwbContext;
 import org.apache.geronimo.security.jacc.ApplicationPolicyConfigurationManager;
 import org.apache.geronimo.security.jacc.RunAsSource;
 import org.apache.geronimo.transaction.GeronimoUserTransaction;
 import org.apache.geronimo.web.WebApplicationConstants;
 import org.apache.geronimo.web.info.ErrorPageInfo;
 import org.apache.geronimo.web.info.WebAppInfo;
-import org.apache.webbeans.config.WebBeansContext;
 import org.eclipse.jetty.http.MimeTypes;
 import org.eclipse.jetty.security.SecurityHandler;
 import org.eclipse.jetty.server.SessionManager;
@@ -136,7 +135,6 @@ public class WebAppContextWrapper implem
                                 @ParamReference(name = "J2EEApplication") J2EEApplication application,
                                 @ParamReference(name = "ContextSource") ContextSource contextSource,
                                 @ParamReference(name = "TransactionManager") TransactionManager transactionManager,
-                                @ParamReference(name = "SharedOwbContext") SharedOwbContext sharedOwbContext,
 
                                 @ParamAttribute(name = "deploymentAttributes") Map<String, Object> deploymentAttributes
     ) throws Exception {
@@ -222,8 +220,9 @@ public class WebAppContextWrapper implem
             }
         }
 
-        IntegrationContext integrationContext = new IntegrationContext(componentContext, unshareableResources, applicationManagedSecurityResources, trackedConnectionAssociator, userTransaction, bundle, holder, servletContainerInitializerMap, abName.toString());
-        webAppContext = new GeronimoWebAppContext(securityHandler, sessionHandler, servletHandler, null, integrationContext, classLoader, modulePath, webAppInfo, policyContextID, applicationPolicyConfigurationManager);
+        IntegrationContext integrationContext = new IntegrationContext(componentContext, unshareableResources, applicationManagedSecurityResources, trackedConnectionAssociator, userTransaction, bundle, holder, servletContainerInitializerMap, abName.getNameProperty(NameFactory.J2EE_NAME));
+        List<String> webModuleListenerClassNames = (List<String>) deploymentAttributes.get(WebApplicationConstants.WEB_MODULE_LISTENERS);
+        webAppContext = new GeronimoWebAppContext(securityHandler, sessionHandler, servletHandler, null, integrationContext, classLoader, modulePath, webAppInfo, policyContextID, applicationPolicyConfigurationManager,  webModuleListenerClassNames == null ? Collections.<String>emptyList() : webModuleListenerClassNames);
         webAppContext.setContextPath(contextPath);
         //See Jetty-386.  Setting this to true can expose secured content.
         webAppContext.setCompactPath(compactPath);
@@ -303,24 +302,8 @@ public class WebAppContextWrapper implem
         }
         //supply web.xml to jasper
         webAppContext.setAttribute(JASPER_WEB_XML_NAME, originalSpecDD);
-        WebBeansContext webBeansContext;
-        if (sharedOwbContext == null) {
-            webBeansContext = OpenWebBeansWebInitializer.newWebBeansContext(null);
-        } else {
-            webBeansContext= sharedOwbContext.getOWBContext();
-        }
-        Thread thread = Thread.currentThread();
-        ClassLoader cl = thread.getContextClassLoader();
-        thread.setContextClassLoader(classLoader);
-        try {
-            OpenWebBeansWebInitializer.initializeServletContext(webBeansContext, webAppContext.getServletContext());
-        } finally {
-            thread.setContextClassLoader(cl);
-        }
-        integrationContext.setOwbContext(webBeansContext);
     }
 
-
     public String getObjectName() {
         return objectName;
     }

Modified: geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java Tue Dec 13 18:00:08 2011
@@ -23,11 +23,13 @@ package org.apache.geronimo.jetty8.handl
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.EventListener;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -50,12 +52,12 @@ import org.apache.geronimo.osgi.web.WebA
 import org.apache.geronimo.security.jacc.ApplicationPolicyConfigurationManager;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
 import org.apache.geronimo.web.WebApplicationConstants;
-import org.apache.geronimo.web.WebApplicationIdentity;
+import org.apache.geronimo.web.WebApplicationName;
+import org.apache.geronimo.web.WebModuleListener;
 import org.apache.geronimo.web.assembler.Assembler;
 import org.apache.geronimo.web.info.WebAppInfo;
 import org.apache.geronimo.web.security.SpecSecurityBuilder;
 import org.apache.geronimo.web.security.WebSecurityConstraintStore;
-import org.apache.webbeans.config.WebBeansContext;
 import org.apache.xbean.osgi.bundle.util.BundleUtils;
 import org.eclipse.jetty.security.SecurityHandler;
 import org.eclipse.jetty.server.Request;
@@ -71,12 +73,16 @@ import org.eclipse.jetty.webapp.WebAppCo
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @version $Rev$ $Date$
  */
 public class GeronimoWebAppContext extends WebAppContext {
 
+    private static final Logger logger = LoggerFactory.getLogger(GeronimoWebAppContext.class);
+
     private final IntegrationContext integrationContext;
     private final String modulePath;
     private final ClassLoader classLoader;
@@ -87,6 +93,7 @@ public class GeronimoWebAppContext exten
     private ServiceRegistration serviceRegistration;
     boolean fullyStarted = false;
     private String webModuleName;
+    private final List webModuleListeners;
 
     public GeronimoWebAppContext(SecurityHandler securityHandler,
                                  SessionHandler sessionHandler,
@@ -95,7 +102,10 @@ public class GeronimoWebAppContext exten
                                  IntegrationContext integrationContext,
                                  ClassLoader classLoader,
                                  String modulePath,
-                                 WebAppInfo webAppInfo, String policyContextId, ApplicationPolicyConfigurationManager applicationPolicyConfigurationManager) {
+                                 WebAppInfo webAppInfo,
+                                 String policyContextId,
+                                 ApplicationPolicyConfigurationManager applicationPolicyConfigurationManager,
+                                 List<String> webModuleListenerClassNames) {
         super(sessionHandler, securityHandler, servletHandler, errorHandler);
         _scontext = new Context();
         this.integrationContext = integrationContext;
@@ -130,6 +140,24 @@ public class GeronimoWebAppContext exten
         boolean annotationScanRequired = true;
         webSecurityConstraintStore = new WebSecurityConstraintStore(webAppInfo, integrationContext.getBundle(), annotationScanRequired, _scontext);
 
+        if (webModuleListenerClassNames != null && webModuleListenerClassNames.size() > 0) {
+            webModuleListeners = new ArrayList(webModuleListenerClassNames.size());
+            for (String webModuleListenerClassName : webModuleListenerClassNames) {
+                try {
+                    Class<?> cls = classLoader.loadClass(webModuleListenerClassName);
+                    Object webModuleListener = cls.newInstance();
+                    webModuleListeners.add(webModuleListener);
+                } catch (ClassNotFoundException e) {
+                    logger.warn("Unable to load the listener class" + webModuleListenerClassName, e);
+                } catch (InstantiationException e) {
+                    logger.warn("Unable to create the listener instance " + webModuleListenerClassName, e);
+                } catch (IllegalAccessException e) {
+                    logger.warn("Unable to create the listener instance " + webModuleListenerClassName, e);
+                }
+            }
+        } else {
+            webModuleListeners = Collections.emptyList();
+        }
     }
 
     public void setWebModuleName(String webModuleName) {
@@ -156,9 +184,17 @@ public class GeronimoWebAppContext exten
         boolean txActive = integrationContext.isTxActive();
         SharedConnectorInstanceContext newContext = integrationContext.newConnectorInstanceContext(null);
         ConnectorInstanceContext connectorContext = integrationContext.setConnectorInstance(null, newContext);
-        WebBeansContext oldOwbContext = integrationContext.contextEntered();
+        String oldApplicationName = WebApplicationName.getName();
+        WebApplicationName.setName(integrationContext.getWebApplicationIdentity());
         try {
             setRestrictListeners(false);
+            for (Object webModuleListener : webModuleListeners) {
+                if (webModuleListener instanceof WebModuleListener) {
+                    ((WebModuleListener) webModuleListener).moduleInitialized(getServletContext());
+                } else {
+                    logger.warn("Invalid WebModuleListener " + webModuleListener.getClass().getName());
+                }
+            }
             try {
                 Assembler assembler = new Assembler();
                 assembler.assemble(getServletContext(), webAppInfo);
@@ -202,9 +238,9 @@ public class GeronimoWebAppContext exten
                 integrationContext.restoreConnectorContext(connectorContext, null, newContext);
             }
         } finally {
-            integrationContext.contextExited(oldOwbContext);
             integrationContext.restoreContext(context);
             integrationContext.completeTx(txActive, null);
+            WebApplicationName.setName(oldApplicationName);
         }
     }
 
@@ -214,15 +250,25 @@ public class GeronimoWebAppContext exten
         boolean txActive = integrationContext.isTxActive();
         SharedConnectorInstanceContext newContext = integrationContext.newConnectorInstanceContext(null);
         ConnectorInstanceContext connectorContext = integrationContext.setConnectorInstance(null, newContext);
+        String oldApplicationName = WebApplicationName.getName();
+        WebApplicationName.setName(integrationContext.getWebApplicationIdentity());
         try {
             try {
                 super.doStop();
             } finally {
                 integrationContext.restoreConnectorContext(connectorContext, null, newContext);
             }
+            for (Object webModuleListener : webModuleListeners) {
+                if (webModuleListener instanceof WebModuleListener) {
+                    ((WebModuleListener) webModuleListener).moduleDestoryed(getServletContext());
+                } else {
+                    logger.warn("Invalid WebModuleListener " + webModuleListener.getClass().getName());
+                }
+            }
         } finally {
             integrationContext.restoreContext(context);
             integrationContext.completeTx(txActive, null);
+            WebApplicationName.setName(oldApplicationName);
         }
     }
 
@@ -232,9 +278,8 @@ public class GeronimoWebAppContext exten
         boolean txActive = integrationContext.isTxActive();
         SharedConnectorInstanceContext newContext = integrationContext.newConnectorInstanceContext(baseRequest);
         ConnectorInstanceContext connectorContext = integrationContext.setConnectorInstance(baseRequest, newContext);
-        WebBeansContext owbContext = integrationContext.contextEntered();
-        String oldApplicationIdentity = WebApplicationIdentity.getIdentity();
-        WebApplicationIdentity.setIdentity(integrationContext.getWebApplicationIdentity());
+        String oldApplicationName = WebApplicationName.getName();
+        WebApplicationName.setName(integrationContext.getWebApplicationIdentity());
         try {
             try {
                 super.doScope(target, baseRequest, request, response);
@@ -242,10 +287,9 @@ public class GeronimoWebAppContext exten
                 integrationContext.restoreConnectorContext(connectorContext, baseRequest, newContext);
             }
         } finally {
-            integrationContext.contextExited(owbContext);
             integrationContext.restoreContext(context);
             integrationContext.completeTx(txActive, baseRequest);
-            WebApplicationIdentity.setIdentity(oldApplicationIdentity);
+            WebApplicationName.setName(oldApplicationName);
         }
     }
 

Modified: geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/IntegrationContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/IntegrationContext.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/IntegrationContext.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/IntegrationContext.java Tue Dec 13 18:00:08 2011
@@ -37,8 +37,6 @@ import org.apache.geronimo.connector.out
 import org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator;
 import org.apache.geronimo.j2ee.annotation.Holder;
 import org.apache.geronimo.naming.java.RootContext;
-import org.apache.geronimo.openejb.cdi.GeronimoSingletonService;
-import org.apache.webbeans.config.WebBeansContext;
 import org.eclipse.jetty.server.Request;
 import org.osgi.framework.Bundle;
 
@@ -56,7 +54,6 @@ public class IntegrationContext {
     private final Holder holder;
     private final Map<ServletContainerInitializer, Set<Class<?>>> servletContainerInitializerMap;
     private final String webApplicationIdentity;
-    private WebBeansContext owbContext;
 
     public IntegrationContext(Context componentContext, Set<String> unshareableResources, Set<String> applicationManagedSecurityResources, TrackedConnectionAssociator trackedConnectionAssociator, UserTransaction userTransaction, Bundle bundle, Holder holder, Map<ServletContainerInitializer, Set<Class<?>>> servletContainerInitializerMap, String webApplicationIdentity) {
         this.componentContext = componentContext;
@@ -180,21 +177,4 @@ public class IntegrationContext {
     public Map<ServletContainerInitializer, Set<Class<?>>> getServletContainerInitializerMap() {
         return servletContainerInitializerMap;
     }
-
-
-    public WebBeansContext contextEntered() {
-        return GeronimoSingletonService.contextEntered(owbContext);
-    }
-
-    public void contextExited(WebBeansContext oldOWBContext) {
-        GeronimoSingletonService.contextExited(oldOWBContext);
-    }
-
-    public void setOwbContext(WebBeansContext owbContext) {
-        this.owbContext = owbContext;
-    }
-
-    public WebBeansContext getOWBContext() {
-        return owbContext;
-    }
 }

Modified: geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/test/java/org/apache/geronimo/jetty8/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/test/java/org/apache/geronimo/jetty8/AbstractWebModuleTest.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/test/java/org/apache/geronimo/jetty8/AbstractWebModuleTest.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/jetty8/geronimo-jetty8/src/test/java/org/apache/geronimo/jetty8/AbstractWebModuleTest.java Tue Dec 13 18:00:08 2011
@@ -70,7 +70,6 @@ import org.apache.geronimo.transaction.m
 import org.apache.geronimo.web.WebApplicationConstants;
 import org.apache.geronimo.web.info.ServletInfo;
 import org.apache.geronimo.web.info.WebAppInfo;
-import org.apache.webbeans.config.WebBeansFinder;
 import org.eclipse.jetty.security.Authenticator;
 import org.eclipse.jetty.security.IdentityService;
 import org.eclipse.jetty.security.LoginService;
@@ -117,7 +116,6 @@ public class AbstractWebModuleTest exten
     }
 
     protected WebAppContextWrapper setUpAppContext(String securityRealmName, SecurityHandlerFactory securityHandlerFactory, String policyContextId, RunAsSource runAsSource, String uriString, WebAppInfo webAppInfo) throws Exception {
-        WebBeansFinder.clearInstances(getClass().getClassLoader());
         ApplicationPolicyConfigurationManager applicationPolicyConfigurationManager = null;
         //Setup default JSP Factory
         Class.forName("org.apache.jasper.compiler.JspRuntimeContext");
@@ -187,7 +185,6 @@ public class AbstractWebModuleTest exten
                 null,
                 contextSource,
                 transactionManager,
-                null,
                 deploymentAttributes
         );
         app.doStart();

Modified: geronimo/server/branches/3.0-beta/plugins/jetty8/jetty8-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jetty8/jetty8-deployer/src/main/plan/plan.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jetty8/jetty8-deployer/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/3.0-beta/plugins/jetty8/jetty8-deployer/src/main/plan/plan.xml Tue Dec 13 18:00:08 2011
@@ -922,7 +922,6 @@
                         <type>car</type>
                     </dependency>
                 </dependencies>
-                <import-package>org.apache.webbeans.config</import-package>                
             </environment>
         </xml-attribute>
     </gbean>

Modified: geronimo/server/branches/3.0-beta/plugins/jetty8/jetty8/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/jetty8/jetty8/pom.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/jetty8/jetty8/pom.xml (original)
+++ geronimo/server/branches/3.0-beta/plugins/jetty8/jetty8/pom.xml Tue Dec 13 18:00:08 2011
@@ -71,12 +71,12 @@
             <version>${project.version}</version>
         </dependency>
 
-        <dependency>
+        <!--dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>openejb</artifactId>
             <version>${project.version}</version>
             <type>car</type>
-        </dependency>
+        </dependency-->
 
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>

Modified: geronimo/server/branches/3.0-beta/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/GeronimoFactoryFinderProvider.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/GeronimoFactoryFinderProvider.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/GeronimoFactoryFinderProvider.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/GeronimoFactoryFinderProvider.java Tue Dec 13 18:00:08 2011
@@ -41,7 +41,7 @@ import javax.faces.render.RenderKitFacto
 import javax.faces.view.ViewDeclarationLanguageFactory;
 import javax.faces.view.facelets.TagHandlerDelegateFactory;
 
-import org.apache.geronimo.web.WebApplicationIdentity;
+import org.apache.geronimo.web.WebApplicationName;
 import org.apache.myfaces.spi.FactoryFinderProvider;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -54,7 +54,7 @@ import org.slf4j.LoggerFactory;
  */
 
 public class GeronimoFactoryFinderProvider implements FactoryFinderProvider {
-    
+
     private static final Logger logger = LoggerFactory.getLogger(GeronimoFactoryFinderProvider.class);
 
     public static final String APPLICATION_FACTORY = "javax.faces.application.ApplicationFactory";
@@ -148,13 +148,13 @@ public class GeronimoFactoryFinderProvid
         Map<String, List<String>> factoryClassNames = null;
         Map<String, Object> factoryMap = null;
 
-        String webApplicationIdentity = WebApplicationIdentity.getIdentity();
-        if(webApplicationIdentity == null) {
+        String webApplicationName = WebApplicationName.getName();
+        if(webApplicationName == null) {
             throw new IllegalStateException("No web identity is attached to current request thread " + Thread.currentThread().getName());
         }
 
         synchronized (_registeredFactoryNames) {
-            factoryClassNames = _registeredFactoryNames.get(webApplicationIdentity);
+            factoryClassNames = _registeredFactoryNames.get(webApplicationName);
 
             if (factoryClassNames == null) {
                 String message = "No Factories configured for this Application. This happens if the faces-initialization "
@@ -170,11 +170,11 @@ public class GeronimoFactoryFinderProvid
                 throw new IllegalArgumentException("no factory " + factoryName + " configured for this application.");
             }
 
-            factoryMap = _factories.get(webApplicationIdentity);
+            factoryMap = _factories.get(webApplicationName);
 
             if (factoryMap == null) {
                 factoryMap = new HashMap<String, Object>();
-                _factories.put(webApplicationIdentity, factoryMap);
+                _factories.put(webApplicationName, factoryMap);
             }
         }
 
@@ -260,7 +260,7 @@ public class GeronimoFactoryFinderProvid
         }
         checkFactoryName(factoryName);
 
-        String webApplicationIdentity = WebApplicationIdentity.getIdentity();
+        String webApplicationIdentity = WebApplicationName.getName();
         if(webApplicationIdentity == null) {
             throw new IllegalStateException("No web identity is attached to current request thread " + Thread.currentThread().getName());
         }
@@ -286,14 +286,14 @@ public class GeronimoFactoryFinderProvid
                 factoryClassNames.put(factoryName, classNameList);
             }
             classNameList.add(implName);
-            if (logger.isDebugEnabled()) {                
+            if (logger.isDebugEnabled()) {
                 logger.debug("Factory map of web application [" + webApplicationIdentity + "] is " + factoryClassNames);
             }
         }
     }
 
     public void releaseFactories() throws FacesException {
-        String webApplicationIdentity = WebApplicationIdentity.getIdentity();
+        String webApplicationIdentity = WebApplicationName.getName();
         if(webApplicationIdentity == null) {
             throw new IllegalStateException("No web identity is attached to current request thread " + Thread.currentThread().getName());
         }
@@ -310,7 +310,7 @@ public class GeronimoFactoryFinderProvid
             if (factoryClassNames != null) {
                 factoryClassNames.clear();
             }
-            _registeredFactoryNames.remove(webApplicationIdentity);            
+            _registeredFactoryNames.remove(webApplicationIdentity);
         }
     }
 

Propchange: geronimo/server/branches/3.0-beta/plugins/openejb/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1,3 +1,4 @@
 /geronimo/server/branches/2.2/plugins/openejb:830343,830385,830420,830443,830766,831498,831811,832538,885058,941914
 /geronimo/server/branches/3.0-M1/plugins/openejb:948864,951792
 /geronimo/server/trunk/plugins/j2ee/openejb:887507
+/geronimo/server/trunk/plugins/openejb:1184839-1213689

Modified: geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/GeronimoSingletonService.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/GeronimoSingletonService.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/GeronimoSingletonService.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/GeronimoSingletonService.java Tue Dec 13 18:00:08 2011
@@ -30,17 +30,25 @@ import org.osgi.framework.Bundle;
  */
 public class GeronimoSingletonService implements SingletonService<WebBeansContext> {
 
+    private static final GeronimoSingletonService INSTANCE = new GeronimoSingletonService();
+
     private static final ThreadLocal<WebBeansContext> contexts = new ThreadLocal<WebBeansContext>();
     private static Bundle bundle;
-    
+
     private static final WebBeansContext noContext = new WebBeansContext();
 
+    private SingletonService<WebBeansContext> webApplicationSingletonService;
+
     public static void init(Bundle owbBundle) {
         bundle = owbBundle;
-        WebBeansFinder.setSingletonService(new GeronimoSingletonService());
+        WebBeansFinder.setSingletonService(INSTANCE);
     }
 
-    public GeronimoSingletonService() {
+    private GeronimoSingletonService() {
+    }
+
+    public static GeronimoSingletonService getInstance() {
+        return INSTANCE;
     }
 
     public static WebBeansContext contextEntered(WebBeansContext newContext) {
@@ -55,20 +63,29 @@ public class GeronimoSingletonService im
 
     @Override
     public WebBeansContext get(Object key) {
-        return getContext();
-    }
-
-    private WebBeansContext getContext() {
         WebBeansContext context = contexts.get();
+        if (context == null && webApplicationSingletonService != null) {
+            context = webApplicationSingletonService.get(key);
+            if (context != null) {
+                return context;
+            }
+        }
         if (context == null) {
             contexts.set(noContext);
         }
         return context;
     }
 
+    public SingletonService<WebBeansContext> getWebApplicationSingletonService() {
+        return webApplicationSingletonService;
+    }
+
+    public void setWebApplicationSingletonService(SingletonService<WebBeansContext> webApplicationSingletonService) {
+        this.webApplicationSingletonService = webApplicationSingletonService;
+    }
+
     @Override
     public void clear(Object key) {
-        getContext().clear();
+        get(key).clear();
     }
-
 }

Modified: geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/OpenWebBeansWebInitializer.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/OpenWebBeansWebInitializer.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/OpenWebBeansWebInitializer.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/OpenWebBeansWebInitializer.java Tue Dec 13 18:00:08 2011
@@ -23,8 +23,10 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
+import java.util.concurrent.ScheduledExecutorService;
 
 import javax.servlet.ServletContext;
+
 import org.apache.openejb.AppContext;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.assembler.classic.AppInfo;
@@ -57,7 +59,7 @@ import org.apache.webbeans.util.WebBeans
  * @version $Rev$ $Date$
  */
 public class OpenWebBeansWebInitializer {
-    
+
     /**Logger instance*/
     private static final WebBeansLogger logger = WebBeansLogger.getLogger(OpenWebBeansWebInitializer.class);
 
@@ -79,16 +81,16 @@ public class OpenWebBeansWebInitializer 
         services.put(ELAdaptor.class, new EL22Adaptor());
         services.put(LoaderService.class, new OptimizedLoaderService());
 
-        if (startup != null && startup instanceof StartupObject){
-            
-            ClassLoader cl=((StartupObject)startup).getAppContext().getClassLoader();
+        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());
@@ -98,81 +100,81 @@ public class OpenWebBeansWebInitializer 
         webBeansContext.registerService(ContainerLifecycle.class, lifecycle);
 
         WebBeansContext oldContext = GeronimoSingletonService.contextEntered(webBeansContext);
+        //from OWB's WebBeansConfigurationListener
         try {
-            //from OWB's WebBeansConfigurationListener
-
-            try {
-                if (startup == null) {
-                    //this should only be used for servlet tests
-                    StartupObject startupObject = new StartupObject(new AppContext("none", SystemInstance.get(), Thread.currentThread().getContextClassLoader(), null, null, true), new AppInfo(), Collections.<BeanContext>emptyList());
-                    lifecycle.startApplication(startupObject);
-//                        lifecycle.startServletContext((ServletContext)startup);
-                } else if (startup instanceof StartupObject) {
-                    lifecycle.startApplication(startup);
-//                        ((StartupObject)startup).getAppContext().setWebBeansContext(webBeansContext);
-                }
-            } catch (Exception e) {
-                //             logger.error(OWBLogConst.ERROR_0018, event.getServletContext().getContextPath());
-                WebBeansUtil.throwRuntimeExceptions(e);
+            if (startup == null) {
+                //this should only be used for servlet tests
+                StartupObject startupObject = new StartupObject(new AppContext("none", SystemInstance.get(), Thread.currentThread().getContextClassLoader(), null, null, true), new AppInfo(),
+                        Collections.<BeanContext> emptyList());
+                lifecycle.startApplication(startupObject);
+                //lifecycle.startServletContext((ServletContext)startup);
+            } else if (startup instanceof StartupObject) {
+                lifecycle.startApplication(startup);
+                //((StartupObject)startup).getAppContext().setWebBeansContext(webBeansContext);
             }
-
+        } catch (Exception e) {
+            //logger.error(OWBLogConst.ERROR_0018, event.getServletContext().getContextPath());
+            WebBeansUtil.throwRuntimeExceptions(e);
         } finally {
             GeronimoSingletonService.contextExited(oldContext);
         }
         return webBeansContext;
     }
 
-    public static void initializeServletContext(WebBeansContext webBeansContext, ServletContext servletContext) {
+    public static ScheduledExecutorService initializeServletContext(WebBeansContext webBeansContext, ServletContext servletContext) {
         WebBeansContext oldContext = GeronimoSingletonService.contextEntered(webBeansContext);
         try {
             OpenEJBLifecycle lifecycle = (OpenEJBLifecycle) webBeansContext.getService(ContainerLifecycle.class);
-            lifecycle.startServletContext(servletContext);
+            //lifecycle.startServletContext(servletContext);
+            //startServletContext will eventually call the static method  initializeServletContext, which will return a ThreadPool reference
+            //We do need to keep that reference to prevent the thread leak
+            return OpenEJBLifecycle.initializeServletContext(servletContext, webBeansContext);
         } finally {
             GeronimoSingletonService.contextExited(oldContext);
         }
     }
 
-//    public OpenWebBeansWebInitializer(WebBeansContext webBeansContext, ServletContext servletContext) {
-//        GeronimoSingletonService.contextEntered(webBeansContext);
-//
-//        try {
-//            setConfiguration(webBeansContext);
-//            //from OWB's WebBeansConfigurationListener
-//            if (servletContext != null) {
-//                ContainerLifecycle lifeCycle = webBeansContext.getService(ContainerLifecycle.class);
-//
-//                try {
-//                    lifeCycle.startApplication(new ServletContextEvent(servletContext));
-//                }
-//                catch (Exception e) {
-//                    //             logger.error(OWBLogConst.ERROR_0018, event.getServletContext().getContextPath());
-//                    WebBeansUtil.throwRuntimeExceptions(e);
-//                }
-//            }
-//
-//        } finally {
-//            GeronimoSingletonService.contextExited(null);
-//        }
-//    }
-//
-//    private void setConfiguration(WebBeansContext webBeansContext) {
-//        OpenWebBeansConfiguration configuration = webBeansContext.getOpenWebBeansConfiguration();
-//        configuration.setProperty(OpenWebBeansConfiguration.APPLICATION_IS_JSP, "true");
-//
-//        webBeansContext.registerService(JNDIService.class, new NoopJndiService());
-//        webBeansContext.registerService(ScannerService.class, new OsgiMetaDataScannerService(webBeansContext));
-//        webBeansContext.registerService(ContextsService.class, new WebContextsService(webBeansContext));
-//        webBeansContext.registerService(ResourceInjectionService.class, new GeronimoResourceInjectionService(webBeansContext));
-//        webBeansContext.registerService(ELAdaptor.class, new EL22Adaptor());
-//        //must be last since it idiotically copies stuff
-//        webBeansContext.registerService(ContainerLifecycle.class, new WebContainerLifecycle());
-////        configuration.setProperty(OpenWebBeansConfiguration.CONTAINER_LIFECYCLE, WebContainerLifecycle.class.getName());
-////        configuration.setProperty(OpenWebBeansConfiguration.JNDI_SERVICE, NoopJndiService.class.getName());
-////        configuration.setProperty(OpenWebBeansConfiguration.SCANNER_SERVICE, OsgiMetaDataScannerService.class.getName());
-////        configuration.setProperty(OpenWebBeansConfiguration.CONTEXTS_SERVICE, WebContextsService.class.getName());
-////        configuration.setProperty(OpenWebBeansConfiguration.RESOURCE_INJECTION_SERVICE, GeronimoResourceInjectionService.class.getName());
-////        configuration.setProperty(OpenWebBeansConfiguration.EL_ADAPTOR_CLASS, EL22Adaptor.class.getName());
-//    }
+    //    public OpenWebBeansWebInitializer(WebBeansContext webBeansContext, ServletContext servletContext) {
+    //        GeronimoSingletonService.contextEntered(webBeansContext);
+    //
+    //        try {
+    //            setConfiguration(webBeansContext);
+    //            //from OWB's WebBeansConfigurationListener
+    //            if (servletContext != null) {
+    //                ContainerLifecycle lifeCycle = webBeansContext.getService(ContainerLifecycle.class);
+    //
+    //                try {
+    //                    lifeCycle.startApplication(new ServletContextEvent(servletContext));
+    //                }
+    //                catch (Exception e) {
+    //                    //             logger.error(OWBLogConst.ERROR_0018, event.getServletContext().getContextPath());
+    //                    WebBeansUtil.throwRuntimeExceptions(e);
+    //                }
+    //            }
+    //
+    //        } finally {
+    //            GeronimoSingletonService.contextExited(null);
+    //        }
+    //    }
+    //
+    //    private void setConfiguration(WebBeansContext webBeansContext) {
+    //        OpenWebBeansConfiguration configuration = webBeansContext.getOpenWebBeansConfiguration();
+    //        configuration.setProperty(OpenWebBeansConfiguration.APPLICATION_IS_JSP, "true");
+    //
+    //        webBeansContext.registerService(JNDIService.class, new NoopJndiService());
+    //        webBeansContext.registerService(ScannerService.class, new OsgiMetaDataScannerService(webBeansContext));
+    //        webBeansContext.registerService(ContextsService.class, new WebContextsService(webBeansContext));
+    //        webBeansContext.registerService(ResourceInjectionService.class, new GeronimoResourceInjectionService(webBeansContext));
+    //        webBeansContext.registerService(ELAdaptor.class, new EL22Adaptor());
+    //        //must be last since it idiotically copies stuff
+    //        webBeansContext.registerService(ContainerLifecycle.class, new WebContainerLifecycle());
+    ////        configuration.setProperty(OpenWebBeansConfiguration.CONTAINER_LIFECYCLE, WebContainerLifecycle.class.getName());
+    ////        configuration.setProperty(OpenWebBeansConfiguration.JNDI_SERVICE, NoopJndiService.class.getName());
+    ////        configuration.setProperty(OpenWebBeansConfiguration.SCANNER_SERVICE, OsgiMetaDataScannerService.class.getName());
+    ////        configuration.setProperty(OpenWebBeansConfiguration.CONTEXTS_SERVICE, WebContextsService.class.getName());
+    ////        configuration.setProperty(OpenWebBeansConfiguration.RESOURCE_INJECTION_SERVICE, GeronimoResourceInjectionService.class.getName());
+    ////        configuration.setProperty(OpenWebBeansConfiguration.EL_ADAPTOR_CLASS, EL22Adaptor.class.getName());
+    //    }
 
     public static class NoopJndiService implements JNDIService {
 

Modified: geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/ThreadSingletonServiceAdapter.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/ThreadSingletonServiceAdapter.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/ThreadSingletonServiceAdapter.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/cdi/ThreadSingletonServiceAdapter.java Tue Dec 13 18:00:08 2011
@@ -29,7 +29,7 @@ import org.apache.webbeans.config.WebBea
  */
 public class ThreadSingletonServiceAdapter implements ThreadSingletonService {
 
-    private final GeronimoSingletonService geronimoSingletonService = new GeronimoSingletonService();
+    private final GeronimoSingletonService geronimoSingletonService = GeronimoSingletonService.getInstance();
 
     public ThreadSingletonServiceAdapter() {
         super();
@@ -75,4 +75,8 @@ public class ThreadSingletonServiceAdapt
     public void clear(Object key) {
         geronimoSingletonService.clear(key);
     }
+
+    public GeronimoSingletonService getGeronimoSingletonService() {
+        return geronimoSingletonService;
+    }
 }

Propchange: geronimo/server/branches/3.0-beta/plugins/openjpa2/geronimo-aries-jpa/src/main/java/org/apache/geronimo/aries/jpa/PersistenceBundleHelper.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -1 +1,2 @@
 /geronimo/server/branches/3.0-M1/plugins/openjpa2/geronimo-aries-jpa/src/main/java/org/apache/geronimo/aries/jpa/PersistenceBundleHelper.java:951792
+/geronimo/server/trunk/plugins/openjpa2/geronimo-aries-jpa/src/main/java/org/apache/geronimo/aries/jpa/PersistenceBundleHelper.java:1184839-1213689

Propchange: geronimo/server/branches/3.0-beta/plugins/openjpa2/geronimo-persistence-jpa20-builder/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 13 18:00:08 2011
@@ -2,3 +2,4 @@
 /geronimo/server/branches/2.2/plugins/openjpa/geronimo-persistence-jpa20-builder:829715
 /geronimo/server/branches/2.2/plugins/openjpa2/geronimo-persistence-jpa20-builder:829426,829715,832538,885058
 /geronimo/server/branches/3.0-M1/plugins/openjpa2/geronimo-persistence-jpa20-builder:948864,951792
+/geronimo/server/trunk/plugins/openjpa2/geronimo-persistence-jpa20-builder:1184839-1213689

Modified: geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans-builder/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans-builder/pom.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans-builder/pom.xml (original)
+++ geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans-builder/pom.xml Tue Dec 13 18:00:08 2011
@@ -51,7 +51,13 @@
             <artifactId>geronimo-openejb</artifactId>
             <version>${project.version}</version>
         </dependency>
-        
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-openwebbeans</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
             <artifactId>geronimo-naming-builder</artifactId>

Modified: geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java Tue Dec 13 18:00:08 2011
@@ -23,7 +23,6 @@ import java.lang.reflect.Member;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -53,10 +52,14 @@ import org.apache.geronimo.j2ee.deployme
 import org.apache.geronimo.j2ee.deployment.NamingBuilder;
 import org.apache.geronimo.j2ee.deployment.WebModule;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.GBeanAlreadyExistsException;
 import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.repository.Environment;
-import org.apache.geronimo.openejb.cdi.WebBeansConfigurationListener;
+import org.apache.geronimo.openwebbeans.OpenWebBeansWebAppContext;
+import org.apache.geronimo.openwebbeans.OpenWebBeansWebModuleListener;
+import org.apache.geronimo.openwebbeans.WebBeansConfigurationListener;
+import org.apache.geronimo.web.WebApplicationConstants;
 import org.apache.geronimo.web.info.WebAppInfo;
 import org.apache.openejb.jee.WebApp;
 import org.apache.xbean.finder.AbstractFinder;
@@ -89,6 +92,8 @@ public class OpenWebBeansModuleBuilderEx
     //this is the geronimo copy
     private static final String CONTEXT_LISTENER_NAME = WebBeansConfigurationListener.class.getName();
 
+    private static final String WEB_MODULE_LISTENER_NAME = OpenWebBeansWebModuleListener.class.getName();
+
     public OpenWebBeansModuleBuilderExtension(
             @ParamAttribute(name = "defaultEnvironment") Environment defaultEnvironment,
             @ParamAttribute(name = "jsfPluginEnvironment") Environment jsfPluginEnvironment,
@@ -100,13 +105,12 @@ public class OpenWebBeansModuleBuilderEx
 
     public void createModule(Module module, Bundle bundle, Naming naming, ModuleIDBuilder idBuilder)
             throws DeploymentException {
-        if (!(module instanceof WebModule) /*|| !hasBeanXml(module)*/) {
+        if (!(module instanceof WebModule)) {
             // not a web module, nothing to do
             return;
         }
-
-        EnvironmentBuilder.mergeEnvironments(module.getEnvironment(), defaultEnvironment);
         if(hasBeanXml(module)){
+            EnvironmentBuilder.mergeEnvironments(module.getEnvironment(), defaultEnvironment);
             EnvironmentBuilder.mergeEnvironments(module.getEnvironment(), jsfPluginEnvironment);
         }
     }
@@ -114,13 +118,12 @@ public class OpenWebBeansModuleBuilderEx
     public void createModule(Module module, Object plan, JarFile moduleFile, String targetPath, URL specDDUrl,
             Environment environment, Object moduleContextInfo, AbstractName earName, Naming naming,
             ModuleIDBuilder idBuilder) throws DeploymentException {
-        if (!(module instanceof WebModule) /*|| !hasBeanXml(module)*/) {
+        if (!(module instanceof WebModule)) {
             // not a web module, nothing to do
             return;
-        }       
-        
-        EnvironmentBuilder.mergeEnvironments(module.getEnvironment(), defaultEnvironment);
+        }
         if(hasBeanXml(module)){
+            EnvironmentBuilder.mergeEnvironments(module.getEnvironment(), defaultEnvironment);
             EnvironmentBuilder.mergeEnvironments(module.getEnvironment(), jsfPluginEnvironment);
         }
     }
@@ -138,23 +141,30 @@ public class OpenWebBeansModuleBuilderEx
             // not a web module, nothing to do
             return;
         }
+        if (!hasBeansXml(bundle)) {
+            return;
+        }
 
         WebModule webModule = (WebModule) module;
-
-//        if (!hasBeansXml(bundle)) {
-//            return;
-//        }
-
         EARContext moduleContext = module.getEarContext();
         Map sharedContext = module.getSharedContext();
-        //add the ServletContextListener to the web app context
+
         GBeanData webAppData = (GBeanData) sharedContext.get(WebModule.WEB_APP_DATA);
-        // add myfaces listener
+        Map<String, Object> deploymentAttributes = (Map<String, Object>)webAppData.getAttribute("deploymentAttributes");
+        List<String> webModuleListenerClassNames = (List<String>) deploymentAttributes.get(WebApplicationConstants.WEB_MODULE_LISTENERS);
+        if (webModuleListenerClassNames == null) {
+            webModuleListenerClassNames = new ArrayList<String>();
+            deploymentAttributes.put(WebApplicationConstants.WEB_MODULE_LISTENERS, webModuleListenerClassNames);
+        }
+        webModuleListenerClassNames.add(WEB_MODULE_LISTENER_NAME);
+
+
+        // add OpenWebBeans Lifcycle listener
         WebAppInfo webAppInfo = (WebAppInfo) webAppData.getAttribute("webAppInfo");
         if (webAppInfo != null && !webAppInfo.listeners.contains(CONTEXT_LISTENER_NAME)) {
             webAppInfo.listeners.add(0, CONTEXT_LISTENER_NAME);
         }
-        AbstractName moduleName = moduleContext.getModuleName();
+        AbstractName moduleName = module.getModuleName();
         Map<EARContext.Key, Object> buildingContext = new HashMap<EARContext.Key, Object>();
         buildingContext.put(NamingBuilder.GBEAN_NAME_KEY, moduleName);
 
@@ -170,18 +180,20 @@ public class OpenWebBeansModuleBuilderEx
         webModule.setClassFinder(classFinder);
         namingBuilders.buildNaming(webApp, geronimoWebApp, webModule, buildingContext);
         webModule.setClassFinder(originalFinder);
-        
 
-//        AbstractName webBeansGBeanName = moduleContext.getNaming().createChildName(moduleName, "webbeans-lifecycle", "webbeans");
-//        GBeanData providerData = new GBeanData(webBeansGBeanName, OpenWebBeansGBean.class);
-//        try {
-//            moduleContext.addGBean(providerData);
-//        } catch (GBeanAlreadyExistsException e) {
-//            throw new DeploymentException("Duplicate webbean config gbean in web module", e);
-//        }
-
-        //make the web app start second after the webbeans machinery
-//        webAppData.addDependency(webBeansGBeanName);
+        AbstractName openWebBeansWebAppContextGBeanName = moduleContext.getNaming().createChildName(moduleName, "OpenWebBeansWebAppContext", "OpenWebBeansWebAppContext");
+        GBeanData openWebBeansWebAppContextGBean = new GBeanData(openWebBeansWebAppContextGBeanName, OpenWebBeansWebAppContext.class);
+        try {
+            openWebBeansWebAppContextGBean.setAttribute("holder", holder);
+            AbstractName sharedOwbContextName = EARContext.APPINFO_GBEAN_NAME_KEY.get(earContext.getGeneralData());
+            if (sharedOwbContextName != null) {
+                openWebBeansWebAppContextGBean.setReferencePattern("SharedOwbContext", sharedOwbContextName);
+            }
+            moduleContext.addGBean(openWebBeansWebAppContextGBean);
+            webAppData.addDependency(openWebBeansWebAppContextGBeanName);
+        } catch (GBeanAlreadyExistsException e) {
+            throw new DeploymentException("Duplicate webbean config gbean in web module", e);
+        }
     }
 
     private boolean hasBeansXml(Bundle bundle) {
@@ -214,7 +226,7 @@ public class OpenWebBeansModuleBuilderEx
         ServiceReference reference = bundle.getBundleContext().getServiceReference(PackageAdmin.class.getName());
         try {
             PackageAdmin packageAdmin = (PackageAdmin) bundle.getBundleContext().getService(reference);
-            
+
             //1. Generated the jar file list, which contains META-INF/beans.xml file
             final Set<String> annotationScanRequiredJarFiles = new HashSet<String>();
             String moduleNamePrefix = webModule.isStandAlone() ? "" : webModule.getTargetPath() + "/";
@@ -252,7 +264,7 @@ public class OpenWebBeansModuleBuilderEx
                     return true;
                 }
             });
-            
+
             final String webInfClassesFolder = moduleNamePrefix + "WEB-INF/classes/";
             final boolean webInfClassesScanRequired = bundle.getEntry(moduleNamePrefix + "WEB-INF/beans.xml") != null;
 
@@ -260,7 +272,7 @@ public class OpenWebBeansModuleBuilderEx
             BundleAnnotationFinder bundleAnnotationFinder = new BundleAnnotationFinder(packageAdmin, bundle, new ResourceDiscoveryFilter() {
 
                 @Override
-                public boolean directoryDiscoveryRequired(String directory) {                    
+                public boolean directoryDiscoveryRequired(String directory) {
                     return directory.equals(webInfClassesFolder) && webInfClassesScanRequired;
                 }
 
@@ -305,5 +317,5 @@ public class OpenWebBeansModuleBuilderEx
             bundle.getBundleContext().ungetService(reference);
         }
     }
-    
+
 }

Modified: geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans-builder/src/test/java/org/apache/geronimo/openwebbeans/deployment/BasicTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans-builder/src/test/java/org/apache/geronimo/openwebbeans/deployment/BasicTest.java?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans-builder/src/test/java/org/apache/geronimo/openwebbeans/deployment/BasicTest.java (original)
+++ geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans-builder/src/test/java/org/apache/geronimo/openwebbeans/deployment/BasicTest.java Tue Dec 13 18:00:08 2011
@@ -20,11 +20,7 @@
 
 package org.apache.geronimo.openwebbeans.deployment;
 
-import java.util.Collections;
-
 import junit.framework.TestCase;
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.j2ee.deployment.NamingBuilderCollection;
 
 /**
  * @version $Rev: 741679 $ $Date: 2009-02-06 11:07:17 -0800 (Fri, 06 Feb 2009) $

Modified: geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans/pom.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans/pom.xml (original)
+++ geronimo/server/branches/3.0-beta/plugins/openwebbeans/geronimo-openwebbeans/pom.xml Tue Dec 13 18:00:08 2011
@@ -34,122 +34,31 @@
     <name>Geronimo Plugins, OpenWebBeans :: Core</name>
     
     <dependencies>
-    
         <dependency>
             <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-j2ee</artifactId>
+            <artifactId>geronimo-web</artifactId>
             <version>${project.version}</version>
         </dependency>
         
         <dependency>
-            <groupId>org.apache.geronimo.framework</groupId>
-            <artifactId>geronimo-naming</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.framework</groupId>
-            <artifactId>geronimo-security</artifactId>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-openejb</artifactId>
             <version>${project.version}</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-annotation_1.1_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-atinject_1.0_spec</artifactId>
         </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-el_2.2_spec</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jaxws_2.2_spec</artifactId>
-        </dependency>
 
         <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jsp_2.2_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jta_1.1_spec</artifactId>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-core</artifactId>
         </dependency>
 
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-servlet_3.0_spec</artifactId>
-        </dependency>        
-        
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-validation_1.0_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.bundles</groupId>
-            <artifactId>myfaces-bundle</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.bundles</groupId>
-            <artifactId>jstl</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-beanutils</groupId>
-            <artifactId>commons-beanutils</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.servicemix.bundles</groupId>
-            <artifactId>org.apache.servicemix.bundles.commons-codec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.bundles</groupId>
-            <artifactId>commons-digester</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.bundles</groupId>
-            <artifactId>commons-discovery</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.servicemix.bundles</groupId>
-            <artifactId>org.apache.servicemix.bundles.dom4j</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.servicemix.bundles</groupId>
-            <artifactId>org.apache.servicemix.bundles.javassist</artifactId>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.apache.geronimo.bundles</groupId>
-            <artifactId>scannotation</artifactId>
         </dependency>
 
         <dependency>
@@ -171,15 +80,16 @@
             <groupId>org.apache.openwebbeans</groupId>
             <artifactId>openwebbeans-impl</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.apache.openwebbeans</groupId>
-            <artifactId>openwebbeans-jsf</artifactId>
-        </dependency>
+
         <dependency>
             <groupId>org.apache.openwebbeans</groupId>
             <artifactId>openwebbeans-ee</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>org.apache.openejb</groupId>
+            <artifactId>openejb-loader</artifactId>
+        </dependency>
     </dependencies>
     <build>
         <plugins>
@@ -188,7 +98,7 @@
                 <artifactId>maven-bundle-plugin</artifactId>
                 <configuration>
                     <instructions>
-                        <Export-SPI-Provider>org.apache.geronimo.openejb.cdi.WebBeansConfigurationListener</Export-SPI-Provider>
+                        <Export-SPI-Provider>org.apache.geronimo.openwebbeans.WebBeansConfigurationListener</Export-SPI-Provider>
                     </instructions>
                 </configuration>
             </plugin>

Modified: geronimo/server/branches/3.0-beta/plugins/openwebbeans/openwebbeans-deployer/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/openwebbeans/openwebbeans-deployer/pom.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/openwebbeans/openwebbeans-deployer/pom.xml (original)
+++ geronimo/server/branches/3.0-beta/plugins/openwebbeans/openwebbeans-deployer/pom.xml Tue Dec 13 18:00:08 2011
@@ -45,12 +45,6 @@
             <type>car</type>
         </dependency>
 
-
-        <dependency>
-            <groupId>org.apache.openwebbeans</groupId>
-            <artifactId>openwebbeans-jsf</artifactId>
-        </dependency>
-
         <dependency>
             <groupId>org.apache.geronimo.configs</groupId>
             <artifactId>openejb</artifactId>
@@ -59,68 +53,15 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>geronimo-openwebbeans-builder</artifactId>
+            <groupId>org.apache.geronimo.configs</groupId>
+            <artifactId>openwebbeans</artifactId>
             <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-annotation_1.1_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-atinject_1.0_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-el_2.2_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-interceptor_1.1_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jaxws_2.2_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jaxrs_1.1_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jsp_2.2_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jta_1.1_spec</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_3.0_spec</artifactId>
+            <type>car</type>
         </dependency>
 
         <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-validation_1.0_spec</artifactId>
+            <groupId>org.apache.openwebbeans</groupId>
+            <artifactId>openwebbeans-jsf</artifactId>
         </dependency>
 
         <dependency>
@@ -129,20 +70,10 @@
         </dependency>
 
         <dependency>
-            <groupId>org.apache.geronimo.bundles</groupId>
-            <artifactId>jstl</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.servicemix.bundles</groupId>
-            <artifactId>org.apache.servicemix.bundles.commons-codec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.geronimo.bundles</groupId>
-            <artifactId>commons-digester</artifactId>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>geronimo-openwebbeans-builder</artifactId>
+            <version>${project.version}</version>
         </dependency>
-
-
     </dependencies>
 
     <build>

Modified: geronimo/server/branches/3.0-beta/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml?rev=1213810&r1=1213809&r2=1213810&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml (original)
+++ geronimo/server/branches/3.0-beta/plugins/openwebbeans/openwebbeans-deployer/src/main/plan/plan.xml Tue Dec 13 18:00:08 2011
@@ -29,7 +29,7 @@
                 <dependencies>
                     <dependency>
                         <groupId>org.apache.geronimo.configs</groupId>
-                        <artifactId>openejb</artifactId>
+                        <artifactId>openwebbeans</artifactId>
                         <type>car</type>
                     </dependency>
                     <!-- The dependencies below is to help deployer to find configuration resources while the deployed application is of WAB type GERONIMO-5916 -->



Mime
View raw message