geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1132395 - in /geronimo/server/trunk/plugins: j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/ jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/ jetty8/geronimo-jetty8/src/main/java/org/apache/geron...
Date Sun, 05 Jun 2011 13:13:36 GMT
Author: xuhaihong
Date: Sun Jun  5 13:13:35 2011
New Revision: 1132395

URL: http://svn.apache.org/viewvc?rev=1132395&view=rev
Log:
a. Update the WebAttributeNames in the geronimo-web module to WebApplicationConstants
b. Update the WebApplicationConstants in the geronimo-wab module to WABApplicationConstants

Added:
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebApplicationConstants.java
      - copied, changed from r1131922, geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebAttributeName.java
    geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WABApplicationConstants.java
      - copied, changed from r1131922, geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WebApplicationConstants.java
Removed:
    geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebAttributeName.java
    geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WebApplicationConstants.java
Modified:
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/WebAppContextWrapper.java
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/test/java/org/apache/geronimo/jetty8/AbstractWebModuleTest.java
    geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/facelet/GeronimoFaceletConfigResourceProviderFactory.java
    geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/info/GeronimoFacesConfigurationMergerFactory.java
    geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/webapp/GeronimoStartupServletContextListener.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/TomcatContainer.java
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/test/java/org/apache/geronimo/tomcat/AbstractWebModuleTest.java
    geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WebApplicationUtils.java
    geronimo/server/trunk/plugins/webservices/geronimo-webservices/src/main/java/org/apache/geronimo/webservices/SerializableWebServiceContainerFactoryGBean.java

Copied: geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebApplicationConstants.java
(from r1131922, geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebAttributeName.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebApplicationConstants.java?p2=geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebApplicationConstants.java&p1=geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebAttributeName.java&r1=1131922&r2=1132395&rev=1132395&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebAttributeName.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web/src/main/java/org/apache/geronimo/web/WebApplicationConstants.java
Sun Jun  5 13:13:35 2011
@@ -20,6 +20,17 @@ package org.apache.geronimo.web;
 /**
  * @version $Rev$ $Date$
  */
-public enum WebAttributeName {
-    META_COMPLETE, ORDERED_LIBS, SCHEMA_VERSION, SERVLET_CONTAINER_INITIALIZERS, WEB_APP_INFO;
+public class WebApplicationConstants {
+
+    public static final String META_COMPLETE = "META_COMPLETE";
+
+    public static final String ORDERED_LIBS = "ORDERED_LIBS";
+
+    public static final String SCHEMA_VERSION = "SCHEMA_VERSION";
+
+    public static final String SERVLET_CONTAINER_INITIALIZERS = "SERVLET_CONTAINER_INITIALIZERS";
+
+    public static final String WEB_APP_INFO = "WEB_APP_INFO";
+
+    public static final String WEB_APP_NAME = "WEB_APP_NAME";
 }

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java?rev=1132395&r1=1132394&r2=1132395&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8-builder/src/main/java/org/apache/geronimo/jetty8/deployment/JettyModuleBuilder.java
Sun Jun  5 13:13:35 2011
@@ -80,7 +80,7 @@ import org.apache.geronimo.schema.Schema
 import org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl;
 import org.apache.geronimo.security.jaas.ConfigurationFactory;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
-import org.apache.geronimo.web.WebAttributeName;
+import org.apache.geronimo.web.WebApplicationConstants;
 import org.apache.geronimo.web.deployment.GenericToSpecificPlanConverter;
 import org.apache.geronimo.web.info.LoginConfigInfo;
 import org.apache.geronimo.web.info.ServletInfo;
@@ -528,10 +528,10 @@ public class JettyModuleBuilder extends 
             }
             //Save Deployment Attributes
             Map<String, Object> deploymentAttributes = new HashMap<String, Object>();
-            deploymentAttributes.put(WebAttributeName.META_COMPLETE.name(), webApp.isMetadataComplete());
-            deploymentAttributes.put(WebAttributeName.SCHEMA_VERSION.name(), INITIAL_WEB_XML_SCHEMA_VERSION.get(earContext.getGeneralData()));
-            deploymentAttributes.put(WebAttributeName.ORDERED_LIBS.name(), AbstractWebModuleBuilder.ORDERED_LIBS.get(earContext.getGeneralData()));
-            deploymentAttributes.put(WebAttributeName.SERVLET_CONTAINER_INITIALIZERS.name(),
AbstractWebModuleBuilder.SERVLET_CONTAINER_INITIALIZERS.get(earContext.getGeneralData()));
+            deploymentAttributes.put(WebApplicationConstants.META_COMPLETE, webApp.isMetadataComplete());
+            deploymentAttributes.put(WebApplicationConstants.SCHEMA_VERSION, INITIAL_WEB_XML_SCHEMA_VERSION.get(earContext.getGeneralData()));
+            deploymentAttributes.put(WebApplicationConstants.ORDERED_LIBS, AbstractWebModuleBuilder.ORDERED_LIBS.get(earContext.getGeneralData()));
+            deploymentAttributes.put(WebApplicationConstants.SERVLET_CONTAINER_INITIALIZERS,
AbstractWebModuleBuilder.SERVLET_CONTAINER_INITIALIZERS.get(earContext.getGeneralData()));
             webModuleData.setAttribute("deploymentAttributes", deploymentAttributes);
 
             //TODO this may definitely not be the best place for this!

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/WebAppContextWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/WebAppContextWrapper.java?rev=1132395&r1=1132394&r2=1132395&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/WebAppContextWrapper.java
(original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/WebAppContextWrapper.java
Sun Jun  5 13:13:35 2011
@@ -58,7 +58,7 @@ import org.apache.geronimo.openwebbeans.
 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.WebAttributeName;
+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;
@@ -180,7 +180,7 @@ public class WebAppContextWrapper implem
         UserTransaction userTransaction = new GeronimoUserTransaction(transactionManager);
         Map<ServletContainerInitializer, Set<Class<?>>> servletContainerInitializerMap
= new LinkedHashMap<ServletContainerInitializer, Set<Class<?>>>();
         //Set ServletContainerInitializer
-        Map<String, Set<String>> servletContainerInitializerClassNamesMap = (Map<String,
Set<String>>) deploymentAttributes.get(WebAttributeName.SERVLET_CONTAINER_INITIALIZERS.name());
+        Map<String, Set<String>> servletContainerInitializerClassNamesMap = (Map<String,
Set<String>>) deploymentAttributes.get(WebApplicationConstants.SERVLET_CONTAINER_INITIALIZERS);
         if (servletContainerInitializerClassNamesMap != null) {
             for (Map.Entry<String, Set<String>> entry : servletContainerInitializerClassNamesMap.entrySet())
{
                 String servletContainerInitializerClassName = entry.getKey();
@@ -211,7 +211,7 @@ public class WebAppContextWrapper implem
         }
 
         final WebBeansContext owbContext = (sharedOwbContext == null) ? new WebBeansContext()
: sharedOwbContext.getOWBContext();
-        
+
         IntegrationContext integrationContext = new IntegrationContext(componentContext,
unshareableResources, applicationManagedSecurityResources, trackedConnectionAssociator, userTransaction,
bundle, holder, servletContainerInitializerMap, owbContext);
         webAppContext = new GeronimoWebAppContext(securityHandler, sessionHandler, servletHandler,
null, integrationContext, classLoader, modulePath, webAppInfo, policyContextID, applicationPolicyConfigurationManager);
         webAppContext.setContextPath(contextPath);

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java?rev=1132395&r1=1132394&r2=1132395&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
(original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
Sun Jun  5 13:13:35 2011
@@ -42,13 +42,14 @@ import javax.servlet.ServletRegistration
 import javax.servlet.ServletSecurityElement;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectorInstanceContext;
 import org.apache.geronimo.connector.outbound.connectiontracking.SharedConnectorInstanceContext;
-import org.apache.geronimo.osgi.web.WebApplicationConstants;
+import org.apache.geronimo.osgi.web.WABApplicationConstants;
 import org.apache.geronimo.osgi.web.WebApplicationUtils;
 import org.apache.geronimo.security.jacc.ApplicationPolicyConfigurationManager;
 import org.apache.geronimo.security.jacc.ComponentPermissions;
-import org.apache.geronimo.web.WebAttributeName;
+import org.apache.geronimo.web.WebApplicationConstants;
 import org.apache.geronimo.web.assembler.Assembler;
 import org.apache.geronimo.web.info.WebAppInfo;
 import org.apache.geronimo.web.security.SpecSecurityBuilder;
@@ -98,15 +99,15 @@ public class GeronimoWebAppContext exten
         this.integrationContext = integrationContext;
         setClassLoader(classLoader);
         this.classLoader = classLoader;
-        
+
         Bundle bundle = BundleUtils.unwrapBundle(integrationContext.getBundle());
-        
-        setAttribute(WebApplicationConstants.BUNDLE_CONTEXT_ATTRIBUTE, 
+
+        setAttribute(WABApplicationConstants.BUNDLE_CONTEXT_ATTRIBUTE,
                      bundle.getBundleContext());
 
-        setAttribute(WebAttributeName.WEB_APP_INFO.name(), webAppInfo);
+        setAttribute(WebApplicationConstants.WEB_APP_INFO, webAppInfo);
 
-        setAttribute("org.springframework.osgi.web." + BundleContext.class.getName(), 
+        setAttribute("org.springframework.osgi.web." + BundleContext.class.getName(),
                      bundle.getBundleContext());
 
         // now set the module context ValidatorFactory in a context property.

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/test/java/org/apache/geronimo/jetty8/AbstractWebModuleTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/test/java/org/apache/geronimo/jetty8/AbstractWebModuleTest.java?rev=1132395&r1=1132394&r2=1132395&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/test/java/org/apache/geronimo/jetty8/AbstractWebModuleTest.java
(original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/test/java/org/apache/geronimo/jetty8/AbstractWebModuleTest.java
Sun Jun  5 13:13:35 2011
@@ -65,11 +65,10 @@ import org.apache.geronimo.system.server
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 import org.apache.geronimo.testsupport.TestSupport;
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
-import org.apache.geronimo.web.WebAttributeName;
+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.apache.webbeans.spi.SingletonService;
 import org.eclipse.jetty.security.Authenticator;
 import org.eclipse.jetty.security.IdentityService;
 import org.eclipse.jetty.security.LoginService;
@@ -148,8 +147,8 @@ public class AbstractWebModuleTest exten
         }
         String contextPath = "/test";
         Map<String, Object> deploymentAttributes = new HashMap<String, Object>();
-        deploymentAttributes.put(WebAttributeName.META_COMPLETE.name(), Boolean.TRUE);
-        deploymentAttributes.put(WebAttributeName.SCHEMA_VERSION.name(), 3.0f);
+        deploymentAttributes.put(WebApplicationConstants.META_COMPLETE, Boolean.TRUE);
+        deploymentAttributes.put(WebApplicationConstants.SCHEMA_VERSION, 3.0f);
         ContextSource contextSource = new WebContextSource(Collections.<String, Object>emptyMap(),
                 Collections.<String, Object>emptyMap(),
                 transactionManager,

Modified: geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/facelet/GeronimoFaceletConfigResourceProviderFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/facelet/GeronimoFaceletConfigResourceProviderFactory.java?rev=1132395&r1=1132394&r2=1132395&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/facelet/GeronimoFaceletConfigResourceProviderFactory.java
(original)
+++ geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/facelet/GeronimoFaceletConfigResourceProviderFactory.java
Sun Jun  5 13:13:35 2011
@@ -24,7 +24,7 @@ import java.util.Collection;
 import javax.faces.context.ExternalContext;
 
 import org.apache.geronimo.myfaces.webapp.MyFacesWebAppContext;
-import org.apache.geronimo.osgi.web.WebApplicationConstants;
+import org.apache.geronimo.osgi.web.WABApplicationConstants;
 import org.apache.myfaces.spi.FaceletConfigResourceProvider;
 import org.apache.myfaces.spi.FaceletConfigResourceProviderFactory;
 import org.osgi.framework.Bundle;
@@ -40,7 +40,7 @@ public class GeronimoFaceletConfigResour
     @Override
     public FaceletConfigResourceProvider createFaceletConfigResourceProvider(ExternalContext
externalContext) {
         if (faceletConfigResourceProvider == null) {
-            Bundle bundle = ((BundleContext) externalContext.getApplicationMap().get(WebApplicationConstants.BUNDLE_CONTEXT_ATTRIBUTE)).getBundle();
+            Bundle bundle = ((BundleContext) externalContext.getApplicationMap().get(WABApplicationConstants.BUNDLE_CONTEXT_ATTRIBUTE)).getBundle();
             final MyFacesWebAppContext myFacesWebAppContext = MyFacesWebAppContext.getMyFacesWebAppContext(bundle);
             faceletConfigResourceProvider = new FaceletConfigResourceProvider() {
 

Modified: geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/info/GeronimoFacesConfigurationMergerFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/info/GeronimoFacesConfigurationMergerFactory.java?rev=1132395&r1=1132394&r2=1132395&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/info/GeronimoFacesConfigurationMergerFactory.java
(original)
+++ geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/info/GeronimoFacesConfigurationMergerFactory.java
Sun Jun  5 13:13:35 2011
@@ -20,7 +20,7 @@ package org.apache.geronimo.myfaces.info
 import javax.faces.context.ExternalContext;
 
 import org.apache.geronimo.myfaces.webapp.MyFacesWebAppContext;
-import org.apache.geronimo.osgi.web.WebApplicationConstants;
+import org.apache.geronimo.osgi.web.WABApplicationConstants;
 import org.apache.myfaces.config.element.FacesConfigData;
 import org.apache.myfaces.spi.FacesConfigurationMerger;
 import org.apache.myfaces.spi.FacesConfigurationMergerFactory;
@@ -38,7 +38,7 @@ public class GeronimoFacesConfigurationM
     public FacesConfigurationMerger getFacesConfigurationMerger(ExternalContext externalContext)
{
         if (facesConfigurationMerger == null) {
             Bundle bundle = ((BundleContext) externalContext.getApplicationMap().get(
-                    WebApplicationConstants.BUNDLE_CONTEXT_ATTRIBUTE)).getBundle();
+                    WABApplicationConstants.BUNDLE_CONTEXT_ATTRIBUTE)).getBundle();
             final MyFacesWebAppContext myFacesWebAppContext = MyFacesWebAppContext.getMyFacesWebAppContext(bundle);
             facesConfigurationMerger = new FacesConfigurationMerger() {
 

Modified: geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/webapp/GeronimoStartupServletContextListener.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/webapp/GeronimoStartupServletContextListener.java?rev=1132395&r1=1132394&r2=1132395&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/webapp/GeronimoStartupServletContextListener.java
(original)
+++ geronimo/server/trunk/plugins/myfaces/geronimo-myfaces/src/main/java/org/apache/geronimo/myfaces/webapp/GeronimoStartupServletContextListener.java
Sun Jun  5 13:13:35 2011
@@ -22,8 +22,8 @@ import javax.servlet.ServletContextEvent
 
 import org.apache.geronimo.myfaces.facelet.GeronimoFaceletConfigResourceProviderFactory;
 import org.apache.geronimo.myfaces.info.GeronimoFacesConfigurationMergerFactory;
-import org.apache.geronimo.osgi.web.WebApplicationConstants;
-import org.apache.geronimo.web.WebAttributeName;
+import org.apache.geronimo.osgi.web.WABApplicationConstants;
+import org.apache.geronimo.web.WebApplicationConstants;
 import org.apache.geronimo.web.info.WebAppInfo;
 import org.apache.myfaces.shared_impl.webapp.webxml.WebXml;
 import org.apache.myfaces.spi.FaceletConfigResourceProviderFactory;
@@ -41,15 +41,10 @@ public class GeronimoStartupServletConte
     public void contextInitialized(ServletContextEvent servletContextEvent) {
         ServletContext servletContext = servletContextEvent.getServletContext();
         //Install GeronimoWebXml instance to the servletContext.
-        WebAppInfo webAppInfo = (WebAppInfo) servletContext.getAttribute(WebAttributeName.WEB_APP_INFO.name());
-        Bundle bundle = ((BundleContext) servletContext.getAttribute(WebApplicationConstants.BUNDLE_CONTEXT_ATTRIBUTE)).getBundle();
+        WebAppInfo webAppInfo = (WebAppInfo) servletContext.getAttribute(WebApplicationConstants.WEB_APP_INFO);
+        Bundle bundle = ((BundleContext) servletContext.getAttribute(WABApplicationConstants.BUNDLE_CONTEXT_ATTRIBUTE)).getBundle();
         GeronimoWebXml webXml = new GeronimoWebXml(bundle, webAppInfo, servletContext.getInitParameter("org.apache.myfaces.DELEGATE_FACES_SERVLET"));
         servletContext.setAttribute(WebXml.class.getName(), webXml);
-        //Install Geronimo Service Provider
-        //MyFacesWebAppContext webAppContext = MyFacesWebAppContext.getMyFacesWebAppContext(bundle);
-        /*Map<String, List<String>> runtimeSpiProviders = new HashMap<String,
List<String>>();
-        runtimeSpiProviders.put(FacesConfigurationMergerFactory.class.getName(), Arrays.asList(GeronimoFacesConfigurationMergerFactory.class.getName()));
-        ServiceProviderFinderFactory.setServiceProviderFinder(servletContext, new GeronimoServiceProviderFinder(runtimeSpiProviders,
webAppContext.getClassLoader()));*/
         servletContext.setAttribute(FacesConfigurationMergerFactory.class.getName(), new
GeronimoFacesConfigurationMergerFactory());
         servletContext.setAttribute(FaceletConfigResourceProviderFactory.class.getName(),
new GeronimoFaceletConfigResourceProviderFactory());
         super.contextInitialized(servletContextEvent);

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=1132395&r1=1132394&r2=1132395&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 Jun  5 13:13:35 2011
@@ -84,7 +84,7 @@ import org.apache.geronimo.tomcat.Tomcat
 import org.apache.geronimo.tomcat.ValveGBean;
 import org.apache.geronimo.tomcat.cluster.CatalinaClusterGBean;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
-import org.apache.geronimo.web.WebAttributeName;
+import org.apache.geronimo.web.WebApplicationConstants;
 import org.apache.geronimo.web.deployment.GenericToSpecificPlanConverter;
 import org.apache.geronimo.web.info.ServletInfo;
 import org.apache.geronimo.web.info.WebAppInfo;
@@ -673,10 +673,10 @@ public class TomcatModuleBuilder extends
 
             //Save Deployment Attributes
             Map<String, Object> deploymentAttributes = new HashMap<String, Object>();
-            deploymentAttributes.put(WebAttributeName.META_COMPLETE.name(), webApp.isMetadataComplete());
-            deploymentAttributes.put(WebAttributeName.SCHEMA_VERSION.name(), INITIAL_WEB_XML_SCHEMA_VERSION.get(earContext.getGeneralData()));
-            deploymentAttributes.put(WebAttributeName.ORDERED_LIBS.name(), AbstractWebModuleBuilder.ORDERED_LIBS.get(earContext.getGeneralData()));
-            deploymentAttributes.put(WebAttributeName.SERVLET_CONTAINER_INITIALIZERS.name(),
AbstractWebModuleBuilder.SERVLET_CONTAINER_INITIALIZERS.get(earContext.getGeneralData()));
+            deploymentAttributes.put(WebApplicationConstants.META_COMPLETE, webApp.isMetadataComplete());
+            deploymentAttributes.put(WebApplicationConstants.SCHEMA_VERSION, INITIAL_WEB_XML_SCHEMA_VERSION.get(earContext.getGeneralData()));
+            deploymentAttributes.put(WebApplicationConstants.ORDERED_LIBS, AbstractWebModuleBuilder.ORDERED_LIBS.get(earContext.getGeneralData()));
+            deploymentAttributes.put(WebApplicationConstants.SERVLET_CONTAINER_INITIALIZERS,
AbstractWebModuleBuilder.SERVLET_CONTAINER_INITIALIZERS.get(earContext.getGeneralData()));
             webModuleData.setAttribute("deploymentAttributes", deploymentAttributes);
 
             //listeners added directly to the StandardContext will get loaded by the tomcat
classloader, not the app classloader!

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=1132395&r1=1132394&r2=1132395&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 Jun  5 13:13:35 2011
@@ -86,7 +86,7 @@ import org.apache.geronimo.tomcat.listen
 import org.apache.geronimo.tomcat.util.SecurityHolder;
 import org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve;
 import org.apache.geronimo.tomcat.valve.ProtectedTargetValve;
-import org.apache.geronimo.web.WebAttributeName;
+import org.apache.geronimo.web.WebApplicationConstants;
 import org.apache.geronimo.web.security.SpecSecurityBuilder;
 import org.apache.geronimo.web.security.WebSecurityConstraintStore;
 import org.apache.geronimo.webservices.POJOWebServiceServlet;
@@ -182,20 +182,20 @@ public class GeronimoStandardContext ext
             if (tomcatWebAppContext.getSecurityHolder() != null) {
                 configurationFactory = tomcatWebAppContext.getSecurityHolder().getConfigurationFactory();
             }
-            float schemaVersion = (Float) tomcatWebAppContext.getDeploymentAttribute(WebAttributeName.SCHEMA_VERSION.name());
-            boolean metaComplete = (Boolean) tomcatWebAppContext.getDeploymentAttribute(WebAttributeName.META_COMPLETE.name());
+            float schemaVersion = (Float) tomcatWebAppContext.getDeploymentAttribute(WebApplicationConstants.SCHEMA_VERSION);
+            boolean metaComplete = (Boolean) tomcatWebAppContext.getDeploymentAttribute(WebApplicationConstants.META_COMPLETE);
             webSecurityConstraintStore = new WebSecurityConstraintStore(tomcatWebAppContext.getWebAppInfo(),
bundle, schemaVersion >= 2.5f && !metaComplete, getInternalServletContext());
 
             servletContext.setAttribute(InstanceManager.class.getName(), ctx.getInstanceManager());
 
             //Set some attributes passed from the deployment process
-            List<String> orderedLists = (List<String>) tomcatWebAppContext.getDeploymentAttribute(WebAttributeName.ORDERED_LIBS.name());
+            List<String> orderedLists = (List<String>) tomcatWebAppContext.getDeploymentAttribute(WebApplicationConstants.ORDERED_LIBS);
             if (orderedLists != null) {
                 servletContext.setAttribute(ServletContext.ORDERED_LIBS, Collections.unmodifiableList(orderedLists));
             }
             //Set ServletContainerInitializer
-            Map<String, Set<String>> servletContainerInitializerClassNamesMap
= (Map<String, Set<String>>) tomcatWebAppContext.getDeploymentAttribute(WebAttributeName.SERVLET_CONTAINER_INITIALIZERS
-                    .name());
+            Map<String, Set<String>> servletContainerInitializerClassNamesMap
= (Map<String, Set<String>>) tomcatWebAppContext
+                    .getDeploymentAttribute(WebApplicationConstants.SERVLET_CONTAINER_INITIALIZERS);
             Bundle bundle = tomcatWebAppContext.getBundle();
             if (servletContainerInitializerClassNamesMap != null) {
                 for (Map.Entry<String, Set<String>> entry : servletContainerInitializerClassNamesMap.entrySet())
{

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java?rev=1132395&r1=1132394&r2=1132395&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/TomcatContainer.java
Sun Jun  5 13:13:35 2011
@@ -45,11 +45,11 @@ import org.apache.geronimo.j2ee.annotati
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.management.geronimo.NetworkConnector;
 import org.apache.geronimo.management.geronimo.WebManager;
-import org.apache.geronimo.osgi.web.WebApplicationConstants;
+import org.apache.geronimo.osgi.web.WABApplicationConstants;
 import org.apache.geronimo.security.ContextManager;
 import org.apache.geronimo.security.jaas.ConfigurationFactory;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
-import org.apache.geronimo.web.WebAttributeName;
+import org.apache.geronimo.web.WebApplicationConstants;
 import org.apache.geronimo.web.info.WebAppInfo;
 import org.apache.geronimo.webservices.SoapHandler;
 import org.apache.geronimo.webservices.WebServiceContainer;
@@ -277,14 +277,14 @@ public class TomcatContainer implements 
             throw new IllegalArgumentException("Invalid virtual host '" + virtualServer +
"'.  Do you have a matching Host entry in the plan?");
         }
         context.setParent(host);
-        
+
         Bundle bundle = BundleUtils.unwrapBundle(contextInfo.getBundle());
         // set the bundle context attribute in the servlet context
-        context.getServletContext().setAttribute(WebApplicationConstants.BUNDLE_CONTEXT_ATTRIBUTE,
+        context.getServletContext().setAttribute(WABApplicationConstants.BUNDLE_CONTEXT_ATTRIBUTE,
                                                  bundle.getBundleContext());
-        context.getServletContext().setAttribute(WebAttributeName.WEB_APP_INFO.name(), contextInfo.getWebAppInfo());
+        context.getServletContext().setAttribute(WebApplicationConstants.WEB_APP_INFO, contextInfo.getWebAppInfo());
 
-        context.getServletContext().setAttribute("org.springframework.osgi.web." + BundleContext.class.getName(),

+        context.getServletContext().setAttribute("org.springframework.osgi.web." + BundleContext.class.getName(),
                                                  bundle.getBundleContext());
 
         // now set the module context ValidatorFactory in a context property.

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=1132395&r1=1132394&r2=1132395&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 Jun  5 13:13:35 2011
@@ -29,7 +29,6 @@ import javax.security.auth.login.LoginEx
 import javax.security.jacc.PolicyContextException;
 import javax.transaction.TransactionManager;
 
-import org.apache.karaf.jaas.boot.ProxyLoginModule;
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinator;
 import org.apache.geronimo.connector.outbound.connectiontracking.GeronimoTransactionListener;
 import org.apache.geronimo.j2ee.jndi.ContextSource;
@@ -59,9 +58,10 @@ import org.apache.geronimo.tomcat.connec
 import org.apache.geronimo.tomcat.connector.Http11ConnectorGBean;
 import org.apache.geronimo.tomcat.util.SecurityHolder;
 import org.apache.geronimo.transaction.manager.TransactionManagerImpl;
-import org.apache.geronimo.web.WebAttributeName;
+import org.apache.geronimo.web.WebApplicationConstants;
 import org.apache.geronimo.web.info.ServletInfo;
 import org.apache.geronimo.web.info.WebAppInfo;
+import org.apache.karaf.jaas.boot.ProxyLoginModule;
 import org.apache.webbeans.config.WebBeansFinder;
 import org.osgi.framework.Bundle;
 
@@ -108,8 +108,8 @@ public abstract class AbstractWebModuleT
                null,
                 null);
         Map<String, Object> deploymentAttributes = new HashMap<String, Object>();
-        deploymentAttributes.put(WebAttributeName.META_COMPLETE.name(), Boolean.TRUE);
-        deploymentAttributes.put(WebAttributeName.SCHEMA_VERSION.name(), 3.0f);
+        deploymentAttributes.put(WebApplicationConstants.META_COMPLETE, Boolean.TRUE);
+        deploymentAttributes.put(WebApplicationConstants.SCHEMA_VERSION, 3.0f);
         TomcatWebAppContext app = new TomcatWebAppContext(cl, //classLoader
                 bundle, //bundle
                 null,   //objectName

Copied: geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WABApplicationConstants.java
(from r1131922, geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WebApplicationConstants.java)
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WABApplicationConstants.java?p2=geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WABApplicationConstants.java&p1=geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WebApplicationConstants.java&r1=1131922&r2=1132395&rev=1132395&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WebApplicationConstants.java
(original)
+++ geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WABApplicationConstants.java
Sun Jun  5 13:13:35 2011
@@ -18,7 +18,7 @@
  */
 package org.apache.geronimo.osgi.web;
 
-public interface WebApplicationConstants {
+public interface WABApplicationConstants {
 
     public static final String BUNDLE_CONTEXT_ATTRIBUTE = "osgi-bundlecontext";
 

Modified: geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WebApplicationUtils.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WebApplicationUtils.java?rev=1132395&r1=1132394&r2=1132395&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WebApplicationUtils.java
(original)
+++ geronimo/server/trunk/plugins/wab/geronimo-wab/src/main/java/org/apache/geronimo/osgi/web/WebApplicationUtils.java
Sun Jun  5 13:13:35 2011
@@ -30,7 +30,7 @@ import org.osgi.framework.ServiceRegistr
 public class WebApplicationUtils {
 
     public static boolean isWebApplicationBundle(Bundle bundle) {
-        return (bundle != null && bundle.getHeaders().get(WebApplicationConstants.CONTEXT_PATH_HEADER)
!= null);
+        return (bundle != null && bundle.getHeaders().get(WABApplicationConstants.CONTEXT_PATH_HEADER)
!= null);
     }
     
     public static ServiceRegistration registerServletContext(BundleContext bundleContext,
ServletContext context) {   
@@ -39,12 +39,12 @@ public class WebApplicationUtils {
     
     public static ServiceRegistration registerServletContext(Bundle bundle, ServletContext
context) {        
         Hashtable<String, String> properties = new Hashtable<String, String>();
-        properties.put(WebApplicationConstants.WEB_SYMBOLIC_NAME, bundle.getSymbolicName());
+        properties.put(WABApplicationConstants.WEB_SYMBOLIC_NAME, bundle.getSymbolicName());
         String version = (String) bundle.getHeaders().get(Constants.BUNDLE_VERSION);
         if (version != null) {
-            properties.put(WebApplicationConstants.WEB_VERSION, version);
+            properties.put(WABApplicationConstants.WEB_VERSION, version);
         }
-        properties.put(WebApplicationConstants.WEB_CONTEXT_PATH, context.getContextPath());
+        properties.put(WABApplicationConstants.WEB_CONTEXT_PATH, context.getContextPath());
         return bundle.getBundleContext().registerService(ServletContext.class.getName(),
context, properties);
     }
     

Modified: geronimo/server/trunk/plugins/webservices/geronimo-webservices/src/main/java/org/apache/geronimo/webservices/SerializableWebServiceContainerFactoryGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/webservices/geronimo-webservices/src/main/java/org/apache/geronimo/webservices/SerializableWebServiceContainerFactoryGBean.java?rev=1132395&r1=1132394&r2=1132395&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/webservices/geronimo-webservices/src/main/java/org/apache/geronimo/webservices/SerializableWebServiceContainerFactoryGBean.java
(original)
+++ geronimo/server/trunk/plugins/webservices/geronimo-webservices/src/main/java/org/apache/geronimo/webservices/SerializableWebServiceContainerFactoryGBean.java
Sun Jun  5 13:13:35 2011
@@ -18,7 +18,6 @@ package org.apache.geronimo.webservices;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
  * @version $Rev$ $Date$



Mime
View raw message