geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1029264 - in /geronimo/server/trunk/plugins: openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/ openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ openwebbeans/geronimo-openwebbeans/src/...
Date Sun, 31 Oct 2010 06:45:45 GMT
Author: djencks
Date: Sun Oct 31 06:45:44 2010
New Revision: 1029264

URL: http://svn.apache.org/viewvc?rev=1029264&view=rev
Log:
GERONIMO-5050 provide a means of sharing the openejb-initialized owb context with web containers.
 Use it for tomcat

Added:
    geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/SharedOwbContext.java
Modified:
    geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystem.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
    geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ThreadSingletonServiceAdapter.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/interceptor/OWBBeforeAfter.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java?rev=1029264&r1=1029263&r2=1029264&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb-builder/src/main/java/org/apache/geronimo/openejb/deployment/EjbModuleBuilder.java
Sun Oct 31 06:45:44 2010
@@ -80,6 +80,7 @@ import org.apache.geronimo.openejb.EjbMo
 import org.apache.geronimo.openejb.GeronimoEjbInfo;
 import org.apache.geronimo.openejb.OpenEjbSystem;
 import org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType;
+import org.apache.geronimo.openwebbeans.SharedOwbContext;
 import org.apache.geronimo.persistence.PersistenceUnitGBean;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
 import org.apache.openejb.OpenEJBException;
@@ -666,6 +667,7 @@ public class EjbModuleBuilder implements
         } catch (GBeanAlreadyExistsException e) {
             throw new DeploymentException("Could not add ejb module gbean", e);
         }
+        module.getSharedContext().put(SharedOwbContext.class, ejbModuleGBeanData);
 
         for (ModuleBuilderExtension builder : moduleBuilderExtensions) {
             try {

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java?rev=1029264&r1=1029263&r2=1029264&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/EjbModuleImpl.java
Sun Oct 31 06:45:44 2010
@@ -42,10 +42,13 @@ import org.apache.geronimo.management.EJ
 import org.apache.geronimo.management.EJBModule;
 import org.apache.geronimo.management.J2EEApplication;
 import org.apache.geronimo.management.J2EEServer;
+import org.apache.geronimo.openwebbeans.SharedOwbContext;
+import org.apache.openejb.AppContext;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.NoSuchApplicationException;
 import org.apache.openejb.UndeployException;
 import org.apache.openejb.assembler.classic.AppInfo;
+import org.apache.openejb.cdi.OWBContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -54,7 +57,7 @@ import org.slf4j.LoggerFactory;
  */
 
 @GBean(j2eeType = NameFactory.EJB_MODULE)
-public class EjbModuleImpl implements EJBModule, GBeanLifecycle {
+public class EjbModuleImpl implements EJBModule, GBeanLifecycle, SharedOwbContext {
     private static final Logger log = LoggerFactory.getLogger(EjbModuleImpl.class);
     private final J2EEServer server;
     private final J2EEApplication application;
@@ -65,6 +68,7 @@ public class EjbModuleImpl implements EJ
 
     private final OpenEjbSystem openEjbSystem;
     private final AppInfo appInfo;
+    private AppContext appContext;
 
     public EjbModuleImpl(@ParamSpecial(type = SpecialAttributeType.objectName) String objectName,
                          @ParamReference(name = "J2EEServer", namingType = NameFactory.J2EE_SERVER)
J2EEServer server,
@@ -166,8 +170,16 @@ public class EjbModuleImpl implements EJ
         return result;
     }
 
+    @Override
+    public Map<String, Object> getOWBContext() {
+        if (appContext == null) {
+            throw new IllegalStateException("Not started");
+        }
+        return appContext.get(OWBContext.class).getSingletons();
+    }
+
     public void doStart() throws Exception {
-        openEjbSystem.createApplication(appInfo, classLoader);
+        appContext = openEjbSystem.createApplication(appInfo, classLoader);
         for (String deploymentId: ejbs.keySet()) {
             BeanContext beanContext = openEjbSystem.getDeploymentInfo(deploymentId);
             GeronimoThreadContextListener.get().getEjbDeployment((BeanContext) beanContext);

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystem.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystem.java?rev=1029264&r1=1029263&r2=1029264&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystem.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystem.java
Sun Oct 31 06:45:44 2010
@@ -21,6 +21,7 @@ import java.util.Properties;
 import javax.ejb.spi.HandleDelegate;
 import javax.naming.NamingException;
 
+import org.apache.openejb.AppContext;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.Container;
 import org.apache.openejb.OpenEJBException;
@@ -53,7 +54,7 @@ public interface OpenEjbSystem {
 
     BeanContext getDeploymentInfo(String deploymentId);
 
-    void createApplication(AppInfo appInfo, ClassLoader classLoader) throws NamingException,
IOException, OpenEJBException;
+    AppContext createApplication(AppInfo appInfo, ClassLoader classLoader) throws NamingException,
IOException, OpenEJBException;
     
     void removeApplication(AppInfo appInfo, ClassLoader classLoader) throws UndeployException,
NoSuchApplicationException;
     

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java?rev=1029264&r1=1029263&r2=1029264&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
Sun Oct 31 06:45:44 2010
@@ -47,6 +47,7 @@ import org.apache.geronimo.kernel.GBeanN
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.persistence.PersistenceUnitGBean;
 import org.apache.geronimo.transaction.manager.RecoverableTransactionManager;
+import org.apache.openejb.AppContext;
 import org.apache.openejb.BeanContext;
 import org.apache.openejb.Container;
 import org.apache.openejb.NoSuchApplicationException;
@@ -421,7 +422,7 @@ public class OpenEjbSystemGBean implemen
         }
     }
 
-    public void createApplication(AppInfo appInfo, ClassLoader classLoader) throws NamingException,
IOException, OpenEJBException {
+    public AppContext createApplication(AppInfo appInfo, ClassLoader classLoader) throws
NamingException, IOException, OpenEJBException {
         Set<AbstractName> names = kernel.listGBeans(new AbstractNameQuery(ResourceAdapterWrapper.class.getName()));
         for (AbstractName name : names) {
             try {
@@ -434,7 +435,7 @@ public class OpenEjbSystemGBean implemen
         ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
         Thread.currentThread().setContextClassLoader(classLoader);
         try {
-            assembler.createApplication(appInfo, classLoader);
+            return assembler.createApplication(appInfo, classLoader);
         } finally {
             Thread.currentThread().setContextClassLoader(oldClassLoader);
         }

Modified: geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ThreadSingletonServiceAdapter.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ThreadSingletonServiceAdapter.java?rev=1029264&r1=1029263&r2=1029264&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ThreadSingletonServiceAdapter.java
(original)
+++ geronimo/server/trunk/plugins/openejb/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/ThreadSingletonServiceAdapter.java
Sun Oct 31 06:45:44 2010
@@ -77,7 +77,7 @@ public class ThreadSingletonServiceAdapt
         configuration.setProperty(OpenWebBeansConfiguration.USE_EJB_DISCOVERY, "true");
         //from CDI builder
         configuration.setProperty(OpenWebBeansConfiguration.INTERCEPTOR_FORCE_NO_CHECKED_EXCEPTIONS,
"false");
-  
+
         configuration.setProperty(OpenWebBeansConfiguration.CONTAINER_LIFECYCLE, OpenEJBLifecycle.class.getName());
         configuration.setProperty(OpenWebBeansConfiguration.JNDI_SERVICE, OpenWebBeansWebInitializer.NoopJndiService.class.getName());
         configuration.setProperty(OpenWebBeansConfiguration.SCANNER_SERVICE, OsgiMetaDataScannerService.class.getName());

Added: geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/SharedOwbContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/SharedOwbContext.java?rev=1029264&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/SharedOwbContext.java
(added)
+++ geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/SharedOwbContext.java
Sun Oct 31 06:45:44 2010
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.openwebbeans;
+
+import java.util.Map;
+
+/**
+ * @version $Rev:$ $Date:$
+ */
+public interface SharedOwbContext {
+    Map<String, Object> getOWBContext();
+}

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=1029264&r1=1029263&r2=1029264&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Sun Oct 31 06:45:44 2010
@@ -28,6 +28,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -71,6 +72,7 @@ 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.openwebbeans.SharedOwbContext;
 import org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl;
 import org.apache.geronimo.security.jaas.ConfigurationFactory;
 import org.apache.geronimo.tomcat.LifecycleListenerGBean;
@@ -675,6 +677,14 @@ public class TomcatModuleBuilder extends
             for (ModuleBuilderExtension mbe : moduleBuilderExtensions) {
                 mbe.addGBeans(earContext, module, bundle, repository);
             }
+            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);
+                }
+            }
             if(tomcatWebApp.isSetSecurityRealmName()) {
                 webModuleData.setReferencePattern("applicationPolicyConfigurationManager",
EARContext.JACC_MANAGER_NAME_KEY.get(earContext.getGeneralData()));
             }

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java?rev=1029264&r1=1029263&r2=1029264&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
Sun Oct 31 06:45:44 2010
@@ -66,6 +66,7 @@ import org.apache.geronimo.common.Deploy
 import org.apache.geronimo.common.GeronimoSecurityException;
 import org.apache.geronimo.kernel.util.FileUtils;
 import org.apache.geronimo.kernel.util.IOUtils;
+import org.apache.geronimo.openwebbeans.OpenWebBeansWebInitializer;
 import org.apache.geronimo.osgi.web.WebApplicationUtils;
 import org.apache.geronimo.security.ContextManager;
 import org.apache.geronimo.security.jaas.ConfigurationFactory;
@@ -226,7 +227,12 @@ public class GeronimoStandardContext ext
             interceptor = new ComponentContextBeforeAfter(interceptor, index++, enc);
         }
 
-        interceptor = new OWBBeforeAfter(interceptor, index++, servletContext);
+        Map<String, Object> owbContext = ctx.getOWBContext();
+        if (owbContext == null) {
+            owbContext = new HashMap<String, Object>();
+            new OpenWebBeansWebInitializer(owbContext, servletContext);
+        }
+        interceptor = new OWBBeforeAfter(interceptor, index++, servletContext, owbContext);
         
         //Set a PolicyContext BeforeAfter
         SecurityHolder securityHolder = ctx.getSecurityHolder();

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java?rev=1029264&r1=1029263&r2=1029264&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContext.java
Sun Oct 31 06:45:44 2010
@@ -98,4 +98,6 @@ public interface TomcatContext {
     WebAppInfo getWebAppInfo();
 
     Map<String, String> getContextAttributes();
+
+    Map<String, Object> getOWBContext();
 }

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java?rev=1029264&r1=1029263&r2=1029264&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
Sun Oct 31 06:45:44 2010
@@ -60,6 +60,7 @@ import org.apache.geronimo.management.J2
 import org.apache.geronimo.management.StatisticsProvider;
 import org.apache.geronimo.management.geronimo.WebContainer;
 import org.apache.geronimo.management.geronimo.WebModule;
+import org.apache.geronimo.openwebbeans.SharedOwbContext;
 import org.apache.geronimo.security.jaas.ConfigurationFactory;
 import org.apache.geronimo.security.jacc.ApplicationPolicyConfigurationManager;
 import org.apache.geronimo.security.jacc.RunAsSource;
@@ -116,9 +117,10 @@ public class TomcatWebAppContext impleme
     private final String modulePath;
     private final Holder holder;
     private final RuntimeCustomizer contextCustomizer;
-    private Map<String, Object> deploymentAttributes;
-    private ApplicationPolicyConfigurationManager applicationPolicyConfigurationManager;
-    private Map<String,String> contextAttributes;
+    private final Map<String, Object> deploymentAttributes;
+    private final ApplicationPolicyConfigurationManager applicationPolicyConfigurationManager;
+    private final Map<String,String> contextAttributes;
+    private final Map<String, Object> owbContext;
 
     // JSR 77
     private final String j2EEServer;
@@ -163,6 +165,7 @@ public class TomcatWebAppContext impleme
             @ParamAttribute(name = "deploymentAttributes") Map<String, Object> deploymentAttributes,
             @ParamAttribute(name = "webAppInfo") WebAppInfo webAppInfo,
             @ParamAttribute(name = "contextAttributes") Map<String, String> contextAttributes,
+            @ParamReference(name = "SharedOwbContext")SharedOwbContext sharedOwbContext,
             @ParamSpecial(type = SpecialAttributeType.kernel) Kernel kernel)
             throws Exception {
         assert classLoader != null;
@@ -283,6 +286,7 @@ public class TomcatWebAppContext impleme
             j2EEServer = null;
             j2EEApplication = null;
         }
+        owbContext = sharedOwbContext == null? null: sharedOwbContext.getOWBContext();
     }
 
     private Map<String, WebServiceContainer> createWebServices(Map<String, AbstractName>
webServiceFactoryMap, Kernel kernel) throws Exception {
@@ -548,6 +552,12 @@ public class TomcatWebAppContext impleme
         return contextAttributes;
     }
 
+    @Override
+    public Map<String, Object> getOWBContext() {
+        return owbContext;
+    }
+
+
     public void doStart() throws Exception {
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
         try {

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/interceptor/OWBBeforeAfter.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/interceptor/OWBBeforeAfter.java?rev=1029264&r1=1029263&r2=1029264&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/interceptor/OWBBeforeAfter.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/interceptor/OWBBeforeAfter.java
Sun Oct 31 06:45:44 2010
@@ -20,14 +20,12 @@
 
 package org.apache.geronimo.tomcat.interceptor;
 
-import java.util.HashMap;
 import java.util.Map;
 
 import javax.servlet.ServletContext;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import org.apache.geronimo.openwebbeans.GeronimoSingletonService;
-import org.apache.geronimo.openwebbeans.OpenWebBeansWebInitializer;
 
 /**
  * @version $Rev$ $Date$
@@ -38,11 +36,10 @@ public class OWBBeforeAfter implements B
     private final int index;
     private final Map<String, Object> owbContext ;
 
-    public OWBBeforeAfter(BeforeAfter next, int index, ServletContext servletContext) {
+    public OWBBeforeAfter(BeforeAfter next, int index, ServletContext servletContext, Map<String,
Object> owbContext) {
         this.next = next;
         this.index = index;
-        this.owbContext = new HashMap<String, Object>();
-        new OpenWebBeansWebInitializer(owbContext, servletContext);
+        this.owbContext = owbContext;
     }
 
     @Override

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java?rev=1029264&r1=1029263&r2=1029264&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
Sun Oct 31 06:45:44 2010
@@ -142,6 +142,7 @@ public abstract class AbstractWebModuleT
                 deploymentAttributes, //Map<String, String> deploymentAttributes
                 webAppInfo, //webAppinfo
                 new HashMap<String, String>(), // Map<String,String> contextAttributes;
+                null,
                 null);  //kernel
         app.doStart();
         return app;



Mime
View raw message