geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r516984 - in /geronimo/server/trunk/modules: geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/ geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/
Date Sun, 11 Mar 2007 18:44:42 GMT
Author: djencks
Date: Sun Mar 11 11:44:42 2007
New Revision: 516984

URL: http://svn.apache.org/viewvc?view=rev&rev=516984
Log:
GERONIMO-2687 Some experimental code got into jetty, make it so specifying run-as subject
doesn't prevent deployment. (run-as NYI in openejb3, so I don't think its critical to make
this part 'work' yet)

Modified:
    geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java

Modified: geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java?view=diff&rev=516984&r1=516983&r2=516984
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6-builder/src/main/java/org/apache/geronimo/jetty6/deployment/JettyModuleBuilder.java
Sun Mar 11 11:44:42 2007
@@ -1017,7 +1017,12 @@
 
         //run-as
         if (servletType.isSetRunAs()) {
-            servletData.setAttribute("runAsRole", servletType.getRunAs().getRoleName().getStringValue().trim());
+            String runAsRole = servletType.getRunAs().getRoleName().getStringValue().trim();
+            //TODO implement role to id mapping
+            //Or go back to direct subject construction.
+            //See GERONIMO-2687
+            String runAsId = null;
+            servletData.setAttribute("runAsId", runAsId);
         }
 
         processRoleRefPermissions(servletType, securityRoles, rolePermissions);

Modified: geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java?view=diff&rev=516984&r1=516983&r2=516984
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyDefaultServletHolder.java
Sun Mar 11 11:44:42 2007
@@ -35,8 +35,8 @@
     public JettyDefaultServletHolder() {
     }
 
-    public JettyDefaultServletHolder(String objectName, String servletName, String servletClassName,
String jspFile, Map initParams, Integer loadOnStartup, Set servletMappings, Subject runAsSubject,
JettyServletRegistration context) throws Exception {
-        super(objectName, servletName, servletClassName, jspFile, initParams, loadOnStartup,
servletMappings, runAsSubject, context);
+    public JettyDefaultServletHolder(String objectName, String servletName, String servletClassName,
String jspFile, Map initParams, Integer loadOnStartup, Set servletMappings, String runAsId,
JettyServletRegistration context) throws Exception {
+        super(objectName, servletName, servletClassName, jspFile, initParams, loadOnStartup,
servletMappings, runAsId, context);
     }
 
     public static final GBeanInfo GBEAN_INFO;

Modified: geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java?view=diff&rev=516984&r1=516983&r2=516984
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyServletHolder.java
Sun Mar 11 11:44:42 2007
@@ -62,9 +62,10 @@
             Map initParams,
             Integer loadOnStartup,
             Set servletMappings,
-            Subject runAsSubject,
+            String runAsId,
             JettyServletRegistration context) throws Exception {
         servletRegistration = context;
+        Subject runAsSubject = getSubjectFromId(runAsId);
         servletHolder = new InternalJettyServletHolder(context == null? null: context.getLifecycleChain(),
runAsSubject, servletRegistration);
         servletHolder.setName(servletName);
         servletHolder.setClassName(servletClassName);
@@ -83,6 +84,12 @@
         this.objectName = objectName;
     }
 
+    private Subject getSubjectFromId(String runAsId) {
+        //TODO implement this.
+        //See GERONIMO-2687
+        return null;
+    }
+
     public String getServletName() {
         return servletHolder.getName();
     }
@@ -135,7 +142,7 @@
         infoBuilder.addAttribute("initParams", Map.class, true);
         infoBuilder.addAttribute("loadOnStartup", Integer.class, true);
         infoBuilder.addAttribute("servletMappings", Set.class, true);
-        infoBuilder.addAttribute("runAsSubject", Subject.class, true);
+        infoBuilder.addAttribute("runAsId", String.class, true);
         infoBuilder.addAttribute("objectName", String.class, false);
         infoBuilder.addInterface(Servlet.class);
 
@@ -148,7 +155,7 @@
                 "initParams",
                 "loadOnStartup",
                 "servletMappings",
-                "runAsSubject",
+                "runAsId",
                 "JettyServletRegistration"});
 
         GBEAN_INFO = infoBuilder.getBeanInfo();



Mime
View raw message