geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r761843 - in /geronimo/sandbox/djencks/jetty7: ./ geronimo-jetty7/ geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/ geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/
Date Sat, 04 Apr 2009 00:14:51 GMT
Author: djencks
Date: Sat Apr  4 00:14:51 2009
New Revision: 761843

URL: http://svn.apache.org/viewvc?rev=761843&view=rev
Log:
Update to eclipse jeety 7 after servlet 2.5 backport

Modified:
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/pom.xml
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyContainerImpl.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/AbstractImmutableHandler.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/InstanceContextHandler.java
    geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/UserTransactionHandler.java
    geronimo/sandbox/djencks/jetty7/pom.xml

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/pom.xml?rev=761843&r1=761842&r2=761843&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/pom.xml (original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/pom.xml Sat Apr  4 00:14:51 2009
@@ -33,15 +33,18 @@
     <name>Geronimo Plugins, Jetty :: Core</name>
 
     <dependencies>
+        <!--<dependency>-->
+            <!--<groupId>org.apache.geronimo.specs</groupId>-->
+            <!--<artifactId>geronimo-servlet_3.0_spec</artifactId>-->
+            <!--<version>1.0-EA-SNAPSHOT</version>-->
+        <!--</dependency>-->
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_3.0_spec</artifactId>
-            <version>1.0-EA-SNAPSHOT</version>
+            <artifactId>geronimo-servlet_2.5_spec</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-ejb_3.0_spec</artifactId>
-            <version>1.0.1</version>
         </dependency>
 
         <dependency>

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyContainerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyContainerImpl.java?rev=761843&r1=761842&r2=761843&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyContainerImpl.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyContainerImpl.java
Sat Apr  4 00:14:51 2009
@@ -67,7 +67,7 @@
     private ContextHandlerCollection contextHandlerCollection = new ContextHandlerCollection();
     private DefaultHandler defaultHandler = new DefaultHandler();
     private RequestLogHandler requestLogHandler = new RequestLogHandler();
-    private boolean statsHandlerInPlace = false;
+//    private boolean statsHandlerInPlace = false;
     private boolean statsOn=false;
 
     public JettyContainerImpl(String objectName, WebManager manager, String jettyHome, ServerInfo
serverInfo) {
@@ -88,10 +88,7 @@
         //handled by a Handler in the ContextHandlerCollection.
         //The third element is the RequestLogHandler, which requires
         //a RequestLog impl to be set.
-        Handler[] handlers = new Handler[3];
-        handlers[0] = contextHandlerCollection;
-        handlers[1] = defaultHandler;
-        handlers[2] = requestLogHandler;
+        Handler[] handlers = {contextHandlerCollection, defaultHandler, requestLogHandler,
statsHandler};
         handlerCollection.setHandlers(handlers);
         server.setHandler(handlerCollection);
 
@@ -140,10 +137,10 @@
         try {
             if (on) {
                 // set the statistics handler if not already done so
-                if (!statsHandlerInPlace) {
-                    handlerCollection.addHandler(statsHandler);
-                    statsHandlerInPlace = true;
-                }
+//                if (!statsHandlerInPlace) {
+//                    handlerCollection.addHandler(statsHandler);
+//                    statsHandlerInPlace = true;
+//                }
                 // clear previous data and set start time
                 resetStats();
                 // start the handler
@@ -151,10 +148,10 @@
             } else {
                 statsHandler.stop();
                 // hack because stats collection really doesn't really stop when statsHandler.stop()
is invoked
-                if (statsHandlerInPlace) {
-                    handlerCollection.removeHandler(statsHandler);
-                    statsHandlerInPlace=false;
-                }
+//                if (statsHandlerInPlace) {
+//                    handlerCollection.removeHandler(statsHandler);
+//                    statsHandlerInPlace=false;
+//                }
             }
             statsOn = on;
         } catch(Exception e) {

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java?rev=761843&r1=761842&r2=761843&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyFilterMapping.java
Sat Apr  4 00:14:51 2009
@@ -19,7 +19,7 @@
 import java.util.Collection;
 import java.util.EnumSet;
 
-import javax.servlet.DispatcherType;
+import org.eclipse.jetty.server.DispatcherType;
 
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
@@ -95,7 +95,6 @@
                 dispatches.add(DispatcherType.ERROR);
             }
 
-
             setFilterName(filterName);
             setDispatcherTypes(dispatches);
             setPathSpecs(urlPatterns);

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/AbstractImmutableHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/AbstractImmutableHandler.java?rev=761843&r1=761842&r2=761843&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/AbstractImmutableHandler.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/AbstractImmutableHandler.java
Sat Apr  4 00:14:51 2009
@@ -62,13 +62,13 @@
     }
 
 
-    public void addHandler(Handler handler) {
-        if (next instanceof HandlerContainer) {
-            ((HandlerContainer) next).addHandler(handler);
-        } else {
-            throw new RuntimeException("geronimo HandlerContainers are immutable");
-        }
-    }
+//    public void addHandler(Handler handler) {
+//        if (next instanceof HandlerContainer) {
+//            ((HandlerContainer) next).addHandler(handler);
+//        } else {
+//            throw new RuntimeException("geronimo HandlerContainers are immutable");
+//        }
+//    }
 
     /**
      * this is basically the implementation from HandlerWrapper.

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/InstanceContextHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/InstanceContextHandler.java?rev=761843&r1=761842&r2=761843&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/InstanceContextHandler.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/InstanceContextHandler.java
Sat Apr  4 00:14:51 2009
@@ -23,7 +23,7 @@
 
 import javax.resource.ResourceException;
 import javax.servlet.ServletException;
-import javax.servlet.DispatcherType;
+import org.eclipse.jetty.server.DispatcherType;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -32,6 +32,7 @@
 import org.apache.geronimo.connector.outbound.connectiontracking.SharedConnectorInstanceContext;
 import org.apache.geronimo.connector.outbound.connectiontracking.TrackedConnectionAssociator;
 import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.Request;
 
 /**
  * @version $Rev$ $Date$
@@ -50,7 +51,7 @@
     }
 
     public void handle(String target, HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
-        DispatcherType dispatch = request.getDispatcherType();
+        DispatcherType dispatch = ((Request)request).getDispatcherType();
         try {
             if (DispatcherType.REQUEST.equals(dispatch)) {
                 ConnectorInstanceContext oldContext = trackedConnectionAssociator.enter(new
SharedConnectorInstanceContext(unshareableResources, applicationManagedSecurityResources,
false));

Modified: geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/UserTransactionHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/UserTransactionHandler.java?rev=761843&r1=761842&r2=761843&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/UserTransactionHandler.java
(original)
+++ geronimo/sandbox/djencks/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/handler/UserTransactionHandler.java
Sat Apr  4 00:14:51 2009
@@ -23,7 +23,8 @@
 import java.io.IOException;
 
 import javax.servlet.ServletException;
-import javax.servlet.DispatcherType;
+//import javax.servlet.DispatcherType;
+import org.eclipse.jetty.server.DispatcherType;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.transaction.Status;
@@ -31,6 +32,7 @@
 import javax.transaction.UserTransaction;
 
 import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.Request;
 
 /**
  * @version $Rev$ $Date$
@@ -48,7 +50,7 @@
         try {
             next.handle(target, request, response);
         } finally {
-             DispatcherType dispatch = request.getDispatcherType();
+             DispatcherType dispatch = ((Request)request).getDispatcherType();
              if ((!active && isMarkedRollback()) || (DispatcherType.REQUEST.equals(dispatch)
&& isActive())) {
                 try {
                     userTransaction.rollback();

Modified: geronimo/sandbox/djencks/jetty7/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/djencks/jetty7/pom.xml?rev=761843&r1=761842&r2=761843&view=diff
==============================================================================
--- geronimo/sandbox/djencks/jetty7/pom.xml (original)
+++ geronimo/sandbox/djencks/jetty7/pom.xml Sat Apr  4 00:14:51 2009
@@ -36,15 +36,19 @@
         Jetty7 plugin
     </description>
 
+    <properties>
+        <jettyVersion>7.0.0.M1-SNAPSHOT</jettyVersion>
+    </properties>
+
     <dependencyManagement>
         <dependencies>
             <dependency>
                 <groupId>org.eclipse.jetty</groupId>
                 <artifactId>jetty-server</artifactId>
-                <version>7.0.0.incubation0-SNAPSHOT</version>
+                <version>${jettyVersion}</version>
                 <exclusions>
                     <exclusion>
-                        <groupId>org.eclipse.jetty</groupId>
+                        <groupId>javax.servlet</groupId>
                         <artifactId>servlet-api</artifactId>
                     </exclusion>
                 </exclusions>
@@ -52,16 +56,16 @@
             <dependency>
                 <groupId>org.eclipse.jetty</groupId>
                 <artifactId>jetty-ajp</artifactId>
-                <version>7.0.0.incubation0-SNAPSHOT</version>
+                <version>${jettyVersion}</version>
             </dependency>
 
             <dependency>
                 <groupId>org.eclipse.jetty</groupId>
                 <artifactId>jetty-servlet</artifactId>
-                <version>7.0.0.incubation0-SNAPSHOT</version>
+                <version>${jettyVersion}</version>
                 <exclusions>
                     <exclusion>
-                        <groupId>org.eclipse.jetty</groupId>
+                        <groupId>javax.servlet</groupId>
                         <artifactId>servlet-api</artifactId>
                     </exclusion>
                 </exclusions>
@@ -70,30 +74,30 @@
             <dependency>
                 <groupId>org.eclipse.jetty</groupId>
                 <artifactId>jetty-util</artifactId>
-                <version>7.0.0.incubation0-SNAPSHOT</version>
+                <version>${jettyVersion}</version>
             </dependency>
-            
+
             <dependency>
                 <groupId>org.eclipse.jetty</groupId>
                 <artifactId>jetty-webapp</artifactId>
-                <version>7.0.0.incubation0-SNAPSHOT</version>
+                <version>${jettyVersion}</version>
             </dependency>
 
             <dependency>
                 <groupId>org.eclipse.jetty</groupId>
                 <artifactId>jetty-security</artifactId>
-                <version>7.0.0.incubation0-SNAPSHOT</version>
+                <version>${jettyVersion}</version>
             </dependency>
             <dependency>
                 <groupId>org.eclipse.jetty</groupId>
                 <artifactId>jetty-jaspi</artifactId>
-                <version>7.0.0.incubation0-SNAPSHOT</version>
+                <version>${jettyVersion}</version>
             </dependency>
             <!-- for JAASLoginModule which we probably don't want -->
             <!--<dependency>-->
-                <!--<groupId>org.eclipse.jetty</groupId>-->
-                <!--<artifactId>jetty-plus</artifactId>-->
-                <!--<version>7.0.0.incubation0-SNAPSHOT</version>-->
+            <!--<groupId>org.eclipse.jetty</groupId>-->
+            <!--<artifactId>jetty-plus</artifactId>-->
+            <!--<version>${jettyVersion}</version>-->
             <!--</dependency>-->
 
         </dependencies>
@@ -111,4 +115,19 @@
         <module>jetty7-clustering-wadi</module>
     </modules>
 
+    <repositories>
+        <repository>
+            <id>oss.sonatype.org</id>
+            <name>Jetty Snapshot Repository</name>
+            <layout>default</layout>
+            <url>http://oss.sonatype.org/content/repositories/jetty-snapshots/</url>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+        </repository>
+    </repositories>
+
 </project>



Mime
View raw message