geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r899900 - /geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
Date Sat, 16 Jan 2010 08:20:03 GMT
Author: djencks
Date: Sat Jan 16 08:20:02 2010
New Revision: 899900

URL: http://svn.apache.org/viewvc?rev=899900&view=rev
Log:
GERONIMO-4992  undo mistaken removal of tomcat osgi-unfriendliness workaround

Modified:
    geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java

Modified: geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java?rev=899900&r1=899899&r2=899900&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
(original)
+++ geronimo/server/trunk/plugins/tomcat/geronimo-tomcat7/src/main/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
Sat Jan 16 08:20:02 2010
@@ -226,63 +226,63 @@
     private final Object instanceListenersLock = new Object();
     private final Object wrapperLifecyclesLock = new Object();
     private final Object wrapperListenersLock = new Object();
-//    public Wrapper createWrapper() {
-//
-//        Wrapper wrapper = null;
-//        if (getWrapperClass() != null) {
-//            try {
-//                wrapper = (Wrapper) getInstanceManager().newInstance(getWrapperClass());
-//            } catch (Throwable t) {
-//                getLogger().error("createWrapper", t);
-//                return (null);
-//            }
-//        } else {
-//            wrapper = new StandardWrapper();
-//        }
-//
-//        synchronized (instanceListenersLock) {
-//            for (String instanceListener: findInstanceListeners()) {
-//                try {
-//                    InstanceListener listener =
-//                      (InstanceListener) getInstanceManager().newInstance(instanceListener);
-//                    wrapper.addInstanceListener(listener);
-//                } catch (Throwable t) {
-//                    getLogger().error("createWrapper", t);
-//                    return (null);
-//                }
-//            }
-//        }
-//
-//        synchronized (wrapperLifecyclesLock) {
-//            for (String wrapperLifecycle: findWrapperLifecycles()) {
-//                try {
-//                    LifecycleListener listener =
-//                      (LifecycleListener) getInstanceManager().newInstance(wrapperLifecycle);
-//                    if (wrapper instanceof Lifecycle)
-//                        ((Lifecycle) wrapper).addLifecycleListener(listener);
-//                } catch (Throwable t) {
-//                    getLogger().error("createWrapper", t);
-//                    return (null);
-//                }
-//            }
-//        }
-//
-//        synchronized (wrapperListenersLock) {
-//            for (String wrapperListener: findWrapperListeners()) {
-//                try {
-//                    ContainerListener listener =
-//                      (ContainerListener) getInstanceManager().newInstance(wrapperListener);
-//                    wrapper.addContainerListener(listener);
-//                } catch (Throwable t) {
-//                    getLogger().error("createWrapper", t);
-//                    return (null);
-//                }
-//            }
-//        }
-//
-//        return (wrapper);
-//
-//    }
+    public Wrapper createWrapper() {
+
+        Wrapper wrapper = null;
+        if (getWrapperClass() != null) {
+            try {
+                wrapper = (Wrapper) getInstanceManager().newInstance(getWrapperClass());
+            } catch (Throwable t) {
+                getLogger().error("createWrapper", t);
+                return (null);
+            }
+        } else {
+            wrapper = new StandardWrapper();
+        }
+
+        synchronized (instanceListenersLock) {
+            for (String instanceListener: findInstanceListeners()) {
+                try {
+                    InstanceListener listener =
+                      (InstanceListener) getInstanceManager().newInstance(instanceListener);
+                    wrapper.addInstanceListener(listener);
+                } catch (Throwable t) {
+                    getLogger().error("createWrapper", t);
+                    return (null);
+                }
+            }
+        }
+
+        synchronized (wrapperLifecyclesLock) {
+            for (String wrapperLifecycle: findWrapperLifecycles()) {
+                try {
+                    LifecycleListener listener =
+                      (LifecycleListener) getInstanceManager().newInstance(wrapperLifecycle);
+                    if (wrapper instanceof Lifecycle)
+                        ((Lifecycle) wrapper).addLifecycleListener(listener);
+                } catch (Throwable t) {
+                    getLogger().error("createWrapper", t);
+                    return (null);
+                }
+            }
+        }
+
+        synchronized (wrapperListenersLock) {
+            for (String wrapperListener: findWrapperListeners()) {
+                try {
+                    ContainerListener listener =
+                      (ContainerListener) getInstanceManager().newInstance(wrapperListener);
+                    wrapper.addContainerListener(listener);
+                } catch (Throwable t) {
+                    getLogger().error("createWrapper", t);
+                    return (null);
+                }
+            }
+        }
+
+        return (wrapper);
+
+    }
     /* This method is called by a background thread to destroy sessions (among other things)
      * so we need to apply appropriate context to the thread to expose JNDI, etc.
      */



Mime
View raw message