User: janb Date: 02/02/26 19:14:49 Modified: jetty/src/main/org/jboss/jetty Jetty.java Log: Ensured security info attached with ThreadLocals is removed after a request has been processed. Revision Changes Path 1.42 +32 -2 contrib/jetty/src/main/org/jboss/jetty/Jetty.java Index: Jetty.java =================================================================== RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/Jetty.java,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- Jetty.java 24 Feb 2002 05:08:29 -0000 1.41 +++ Jetty.java 27 Feb 2002 03:14:49 -0000 1.42 @@ -5,7 +5,7 @@ * See terms of license at gnu.org. */ -// $Id: Jetty.java,v 1.41 2002/02/24 05:08:29 janb Exp $ +// $Id: Jetty.java,v 1.42 2002/02/27 03:14:49 janb Exp $ // A Jetty HttpServer with the interface expected by JBoss' // J2EEDeployer... @@ -17,6 +17,7 @@ //------------------------------------------------------------------------------ import java.io.ByteArrayOutputStream; +import java.io.IOException; import java.net.URL; import java.util.Hashtable; import javax.xml.parsers.DocumentBuilder; @@ -32,6 +33,11 @@ import org.jboss.logging.Logger; import org.jboss.web.AbstractWebContainer.WebDescriptorParser; import org.jboss.web.WebApplication; +import org.jboss.security.SecurityAssociation; +import org.mortbay.http.HttpContext; +import org.mortbay.http.HttpRequest; +import org.mortbay.http.HttpResponse; +import org.mortbay.http.HttpException; import org.mortbay.jetty.servlet.WebApplicationContext; import org.mortbay.util.MultiException; import org.mortbay.xml.XmlConfiguration; @@ -44,7 +50,7 @@ * * @author <a href="mailto:[EMAIL PROTECTED]">Julian Gosnell</a> * @author <a href="mailto:[EMAIL PROTECTED]">Andreas Schaefer</a>. - * @version $Revision: 1.41 $ + * @version $Revision: 1.42 $ * * <p><b>Revisions:</b> * @@ -516,4 +522,28 @@ { return _service.getCompileClasspath(cl); } + + + /** Override service method to allow ditching of security info + * after a request has been processed + * @param request + * @param response + * @return + * @exception IOException + * @exception HttpException + */ + public HttpContext service(HttpRequest request,HttpResponse response) + throws IOException, HttpException + { + try + { + return super.service(request,response); + } + finally + { + SecurityAssociation.setPrincipal(null); + } + } + + }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development