geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r601045 - /geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java
Date Tue, 04 Dec 2007 19:15:27 GMT
Author: gawor
Date: Tue Dec  4 11:15:27 2007
New Revision: 601045

URL: http://svn.apache.org/viewvc?rev=601045&view=rev
Log:
make JNDI available to filter.init() and filter.destroy() (GERONIMO-3671)

Modified:
    geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java

Modified: geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java?rev=601045&r1=601044&r2=601045&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java
(original)
+++ geronimo/server/trunk/plugins/jetty/geronimo-jetty6/src/main/java/org/apache/geronimo/jetty6/JettyFilterHolder.java
Tue Dec  4 11:15:27 2007
@@ -22,6 +22,7 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.jetty6.handler.LifecycleCommand;
 import org.mortbay.jetty.servlet.FilterHolder;
 
 /**
@@ -85,6 +86,36 @@
                 servletRegistration.destroyInstance(o);
                 destroyed = true;
             }
+        }
+        
+        public void doStop() {
+            LifecycleCommand lifecycleCommand = (new LifecycleCommand() {
+                public void lifecycleMethod() throws Exception {
+                    internalDoStop();
+                }
+            });
+            try {
+                this.servletRegistration.getLifecycleChain().lifecycleCommand(lifecycleCommand);
+            } catch (Exception e) {
+                //ignore????
+            }
+        }
+        
+        public void doStart() throws Exception {
+            LifecycleCommand lifecycleCommand = (new LifecycleCommand() {
+                public void lifecycleMethod() throws Exception {
+                    internalDoStart();
+                }
+            });
+            this.servletRegistration.getLifecycleChain().lifecycleCommand(lifecycleCommand);
+        }
+        
+        private void internalDoStart() throws Exception {
+            super.doStart();
+        }
+
+        private void internalDoStop() {
+            super.doStop();
         }
 
     }



Mime
View raw message