geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r289133 - in /geronimo/trunk/modules: jetty-builder/src/java/org/apache/geronimo/jetty/deployment/ jetty/src/java/org/apache/geronimo/jetty/ jetty/src/test-resources/deployables/war3/WEB-INF/
Date Thu, 15 Sep 2005 02:36:33 GMT
Author: djencks
Date: Wed Sep 14 19:36:27 2005
New Revision: 289133

URL: http://svn.apache.org/viewcvs?rev=289133&view=rev
Log:
GERONIMO-1013. Add run-as for servlets in jetty

Removed:
    geronimo/trunk/modules/jetty/src/test-resources/deployables/war3/WEB-INF/jetty-web.xml
Modified:
    geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java

Modified: geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?rev=289133&r1=289132&r2=289133&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Wed Sep 14 19:36:27 2005
@@ -996,6 +996,10 @@
         Set mappings = (Set) servletMappings.get(servletName);
         servletData.setAttribute("servletMappings", mappings == null ? Collections.EMPTY_SET
: mappings);
 
+        //run-as
+        if (servletType.isSetRunAs()) {
+            servletData.setAttribute("runAsRole", servletType.getRunAs().getRoleName().getStringValue().trim());
+        }
 
         //WebRoleRefPermissions
         SecurityRoleRefType[] securityRoleRefTypeArray = servletType.getSecurityRoleRefArray();

Modified: geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java?rev=289133&r1=289132&r2=289133&view=diff
==============================================================================
--- geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java
(original)
+++ geronimo/trunk/modules/jetty/src/java/org/apache/geronimo/jetty/JettyServletHolder.java
Wed Sep 14 19:36:27 2005
@@ -61,6 +61,7 @@
                               Integer loadOnStartup,
                               Set servletMappings,
                               Map webRoleRefPermissions,
+                              String runAsRole,
                               ServletHolder previous,  //dependency for startup ordering
                               JettyServletRegistration context) throws Exception {
         super(context == null? null: context.getServletHandler(), servletName, servletClassName,
jspFile);
@@ -69,12 +70,13 @@
         if (context != null) {
             putAll(initParams);
             if (loadOnStartup != null) {
+                //This has no effect on the actual start order, the gbean references "previous"
control that.
                 setInitOrder(loadOnStartup.intValue());
             }
             //this now starts the servlet in the appropriate context
             context.registerServletHolder(this, servletName, servletMappings, webRoleRefPermissions
== null? Collections.EMPTY_MAP: webRoleRefPermissions);
-//            start();
         }
+        setRunAs(runAsRole);
         this.objectName = objectName;
     }
 
@@ -141,6 +143,7 @@
         infoBuilder.addAttribute("loadOnStartup", Integer.class, true);
         infoBuilder.addAttribute("servletMappings", Set.class, true);
         infoBuilder.addAttribute("webRoleRefPermissions", Map.class, true);
+        infoBuilder.addAttribute("runAsRole", String.class, true);
         infoBuilder.addAttribute("objectName", String.class, false);
         infoBuilder.addInterface(Servlet.class);
 
@@ -155,6 +158,7 @@
                                                  "loadOnStartup",
                                                  "servletMappings",
                                                  "webRoleRefPermissions",
+                                                 "runAsRole",
                                                  "Previous",
                                                  "JettyServletRegistration"});
 



Mime
View raw message