geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viol...@apache.org
Subject svn commit: r1101313 - in /geronimo/server/trunk/plugins: j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/ jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/
Date Tue, 10 May 2011 05:26:04 GMT
Author: violalu
Date: Tue May 10 05:26:03 2011
New Revision: 1101313

URL: http://svn.apache.org/viewvc?rev=1101313&view=rev
Log:
GERONIMO-5949 Move session-config and login-config from JspModuleBuilderExtension.java to
AbstractWebModuleBuilder.java

Modified:
    geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
    geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java?rev=1101313&r1=1101312&r2=1101313&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
(original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/AbstractWebModuleBuilder.java
Tue May 10 05:26:03 2011
@@ -97,8 +97,10 @@ import org.apache.geronimo.xbeans.geroni
 import org.apache.openejb.jee.Filter;
 import org.apache.openejb.jee.JaxbJavaee;
 import org.apache.openejb.jee.Listener;
+import org.apache.openejb.jee.LoginConfig;
 import org.apache.openejb.jee.Servlet;
 import org.apache.openejb.jee.ServletMapping;
+import org.apache.openejb.jee.SessionConfig;
 import org.apache.openejb.jee.WebApp;
 import org.apache.xbean.finder.AbstractFinder;
 import org.apache.xbean.finder.ClassFinder;
@@ -442,6 +444,19 @@ public abstract class AbstractWebModuleB
         if (hasSecurityRealmName) {
             earContext.setHasSecurity(true);
         }
+        
+      //Inform errors if login-config element contains more than one
+        List<LoginConfig> loginConfigs = webApp.getLoginConfig();
+        if (loginConfigs.size() > 1) {
+            throw new DeploymentException("Web app " + webApp.getDisplayName() + " cannot
have more than one login-config element.  Currently has " + loginConfigs.size() + " login-config
elements.");
+        }
+        
+       //Inform errors if session-config element contains more than one
+        List<SessionConfig> sessionConfigs = webApp.getSessionConfig();
+        if (sessionConfigs.size() > 1) {
+            throw new DeploymentException("Web app " + webApp.getDisplayName() + " cannot
have more than one sesion-config element.  Currently has " + sessionConfigs.size() + " session-config
elements.");
+        }
+        
         //TODO think about how to provide a default security realm name
         XmlObject[] securityElements = XmlBeansUtil.selectSubstitutionGroupElements(SECURITY_QNAME,
gerWebApp);
         if (securityElements.length > 0 && !hasSecurityRealmName) {

Modified: geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java?rev=1101313&r1=1101312&r2=1101313&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
(original)
+++ geronimo/server/trunk/plugins/jasper/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
Tue May 10 05:26:03 2011
@@ -71,8 +71,6 @@ import org.apache.openejb.jee.Tag;
 import org.apache.openejb.jee.Taglib;
 import org.apache.openejb.jee.TldTaglib;
 import org.apache.openejb.jee.WebApp;
-import org.apache.openejb.jee.LoginConfig;
-import org.apache.openejb.jee.SessionConfig;
 import org.apache.xbean.finder.ClassFinder;
 import org.apache.xmlbeans.XmlObject;
 import org.osgi.framework.Bundle;
@@ -195,20 +193,7 @@ public class JspModuleBuilderExtension i
                 for (JspPropertyGroup propertyGroup : jspConfig.getJspPropertyGroup()) {
                     WebAppInfoBuilder.normalizeUrlPatterns(propertyGroup.getUrlPattern(),
jspMappings);
                 }
-            }
-
-            
-            //login-config element
-            List<LoginConfig> loginConfigs = webApp.getLoginConfig();
-            if (loginConfigs.size() > 1) {
-                throw new DeploymentException("Web app " + module.getName() + " cannot have
more than one login-config element.  Currently has " + loginConfigs.size() + " login-config
elements.");
-            }
-            
-           //session-config element
-            List<SessionConfig> sessionConfigs = webApp.getSessionConfig();
-            if (sessionConfigs.size() > 1) {
-                throw new DeploymentException("Web app " + module.getName() + " cannot have
more than one sesion-config element.  Currently has " + sessionConfigs.size() + " session-config
elements.");
-            }            
+            }       
             
             jspServlet.servletMappings.addAll(jspMappings);
             for (ServletInfo servletInfo: webAppInfo.servlets) {



Mime
View raw message