geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r1031437 - in /geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7: FilterHolderWrapper.java GeronimoServletHolder.java JettyServletRegistration.java WebAppContextWrapper.java
Date Fri, 05 Nov 2010 05:23:05 GMT
Author: genspring
Date: Fri Nov  5 05:23:04 2010
New Revision: 1031437

URL: http://svn.apache.org/viewvc?rev=1031437&view=rev
Log:
Clean up the jetty integration code to fix the filter injection tck failures.

Modified:
    geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java
    geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java
    geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyServletRegistration.java
    geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java

Modified: geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java?rev=1031437&r1=1031436&r2=1031437&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java
(original)
+++ geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/FilterHolderWrapper.java
Fri Nov  5 05:23:04 2010
@@ -18,6 +18,8 @@ package org.apache.geronimo.jetty7;
 
 import java.util.Map;
 
+import javax.servlet.Filter;
+
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectorInstanceContext;
 import org.apache.geronimo.connector.outbound.connectiontracking.SharedConnectorInstanceContext;
 import org.apache.geronimo.gbean.GBeanInfo;
@@ -101,6 +103,7 @@ public class FilterHolderWrapper impleme
             ConnectorInstanceContext connectorContext = integrationContext.setConnectorInstance(null,
newContext);
             try {
                 try {
+                    super.setFilter((Filter)newInstance());
                     super.doStart();
                 } finally {
                     integrationContext.restoreConnectorContext(connectorContext, null, newContext);

Modified: geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java?rev=1031437&r1=1031436&r2=1031437&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java
(original)
+++ geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/GeronimoServletHolder.java
Fri Nov  5 05:23:04 2010
@@ -39,7 +39,7 @@ public class GeronimoServletHolder exten
     }
 
     public synchronized Servlet newInstance() throws InstantiationException, IllegalAccessException
{
-        return servletRegistration.newInstance(_className);
+        return (Servlet)servletRegistration.newInstance(_className);
     }
 
     public void destroyInstance(Object o) throws Exception {

Modified: geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyServletRegistration.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyServletRegistration.java?rev=1031437&r1=1031436&r2=1031437&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyServletRegistration.java
(original)
+++ geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/JettyServletRegistration.java
Fri Nov  5 05:23:04 2010
@@ -37,7 +37,7 @@ public interface JettyServletRegistratio
 
     ClassLoader getWebClassLoader();
 
-    Servlet newInstance(String className) throws InstantiationException, IllegalAccessException;
+    Object newInstance(String className) throws InstantiationException, IllegalAccessException;
 
     void destroyInstance(Object o) throws Exception;
 

Modified: geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java?rev=1031437&r1=1031436&r2=1031437&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java
(original)
+++ geronimo/server/branches/2.2/plugins/jetty7/geronimo-jetty7/src/main/java/org/apache/geronimo/jetty7/WebAppContextWrapper.java
Fri Nov  5 05:23:04 2010
@@ -307,14 +307,7 @@ public class WebAppContextWrapper implem
         return integrationContext;
     }
 
-    public Servlet newInstance(String className) throws InstantiationException, IllegalAccessException
{
-        if (className == null) {
-            throw new InstantiationException("no class loaded");
-        }
-        return (Servlet)holder.newInstance(className, webClassLoader, componentContext);
-    }
-
-    public Object newFilterInstance(String className) throws InstantiationException, IllegalAccessException
{
+    public Object newInstance(String className) throws InstantiationException, IllegalAccessException
{
         if (className == null) {
             throw new InstantiationException("no class loaded");
         }
@@ -367,7 +360,7 @@ public class WebAppContextWrapper implem
         if (eventListeners != null) {
             Collection<EventListener> listeners = new ArrayList<EventListener>();
             for (String listenerClassName : eventListeners) {
-                EventListener listener = (EventListener) newFilterInstance(listenerClassName);
+                EventListener listener = (EventListener) newInstance(listenerClassName);
                 listeners.add(listener);
             }
             webAppContext.setEventListeners(listeners.toArray(new EventListener[listeners.size()]));



Mime
View raw message