geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r999239 - /geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
Date Tue, 21 Sep 2010 06:52:51 GMT
Author: djencks
Date: Tue Sep 21 06:52:51 2010
New Revision: 999239

URL: http://svn.apache.org/viewvc?rev=999239&view=rev
Log:
Jetty now allows configuration of not restricting adding event listeners

Modified:
    geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java

Modified: geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java?rev=999239&r1=999238&r2=999239&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
(original)
+++ geronimo/server/trunk/plugins/jetty8/geronimo-jetty8/src/main/java/org/apache/geronimo/jetty8/handler/GeronimoWebAppContext.java
Tue Sep 21 06:52:51 2010
@@ -29,7 +29,6 @@ import java.util.EventListener;
 import java.util.HashSet;
 import java.util.Set;
 
-import javax.naming.InitialContext;
 import javax.naming.NamingException;
 
 import javax.servlet.Filter;
@@ -110,12 +109,14 @@ public class GeronimoWebAppContext exten
         SharedConnectorInstanceContext newContext = integrationContext.newConnectorInstanceContext(null);
         ConnectorInstanceContext connectorContext = integrationContext.setConnectorInstance(null,
newContext);
         try {
+            setRestrictListeners(false);
             try {
                 Assembler assembler = new Assembler();
                 assembler.assemble(getServletContext(), webAppInfo);
                 super.doStart();
                 fullyStarted = true;
             } finally {
+                setRestrictListeners(true);
                 integrationContext.restoreConnectorContext(connectorContext, null, newContext);
             }
         } finally {
@@ -256,31 +257,6 @@ public class GeronimoWebAppContext exten
 
     public class Context extends WebAppContext.Context {
 
-        /**
-         * This is copied from jetty so we can override the restriction on event listeners.
-         * TODO consider talking to jetty about making this more flexible there.
-         * @param listenerClass class of desired listener
-         */
-        @Override
-        public void addListener(Class<? extends EventListener> listenerClass)
-        {
-            if (!_enabled)
-                throw new UnsupportedOperationException();
-
-            try
-            {
-                EventListener e = createListener(listenerClass);
-                GeronimoWebAppContext.this.addEventListener(e);
-                if (fullyStarted) {
-                    GeronimoWebAppContext.this.restrictEventListener(e);
-                }
-            }
-            catch (ServletException e)
-            {
-                throw new IllegalArgumentException(e);
-            }
-        }
-
         @Override
         public <T extends Filter> T createFilter(Class<T> c) throws ServletException
{
             try {



Mime
View raw message