geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r549859 - /geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java
Date Fri, 22 Jun 2007 16:05:14 GMT
Author: gawor
Date: Fri Jun 22 09:05:13 2007
New Revision: 549859

URL: http://svn.apache.org/viewvc?view=rev&rev=549859
Log:
use InternalJettyServletHolder instead

Modified:
    geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java

Modified: geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java?view=diff&rev=549859&r1=549858&r2=549859
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyPOJOWebServiceHolder.java
Fri Jun 22 09:05:13 2007
@@ -20,6 +20,7 @@
 import java.util.Map;
 import java.util.Set;
 
+import javax.security.auth.Subject;
 import javax.security.jacc.PolicyContext;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
@@ -63,20 +64,22 @@
     }
 
     public JettyPOJOWebServiceHolder(String pojoClassName,
-            String servletName,
-            Map initParams,
-            Integer loadOnStartup,
-            Set servletMappings,
-            WebServiceContainerFactory webServiceContainerFactory,
-            JettyServletRegistration context) throws Exception {
-        servletHolder = new ServletHolder();
+                                     String servletName,
+                                     Map initParams,
+                                     Integer loadOnStartup,
+                                     Set servletMappings,
+                                     String runAsRole, 
+                                     WebServiceContainerFactory webServiceContainerFactory,
+                                     JettyServletRegistration context) throws Exception {
+        Subject runAsSubject = context == null? null: context.getSubjectForRole(runAsRole);
+        servletHolder = new InternalJettyServletHolder(context == null? null: context.getLifecycleChain(),
runAsSubject, context);
         //context will be null only for use as "default servlet info holder" in deployer.
 
         this.pojoClassName = pojoClassName;
         this.context = context;
         this.webServiceContainer = webServiceContainerFactory == null? null: webServiceContainerFactory.getWebServiceContainer();
         this.servletMappings = servletMappings;
-        if (context != null) {
+        if (context != null) {            
             servletHolder.setName(servletName);
             servletHolder.setClassName(POJOWebServiceServlet.class.getName());
             servletHolder.setInitParameters(initParams);
@@ -162,6 +165,7 @@
         infoBuilder.addAttribute("initParams", Map.class, true);
         infoBuilder.addAttribute("loadOnStartup", Integer.class, true);
         infoBuilder.addAttribute("servletMappings", Set.class, true);
+        infoBuilder.addAttribute("runAsRole", String.class, true);
         infoBuilder.addReference("WebServiceContainerFactory", WebServiceContainerFactory.class);
         infoBuilder.addReference("JettyServletRegistration", JettyServletRegistration.class);
 
@@ -170,6 +174,7 @@
                 "initParams",
                 "loadOnStartup",
                 "servletMappings",
+                "runAsRole",
                 "WebServiceContainerFactory",
                 "JettyServletRegistration"});
 



Mime
View raw message