geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdam...@apache.org
Subject svn commit: r396194 - /geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
Date Sun, 23 Apr 2006 01:56:22 GMT
Author: gdamour
Date: Sat Apr 22 18:56:21 2006
New Revision: 396194

URL: http://svn.apache.org/viewcvs?rev=396194&view=rev
Log:
GERONIMO-1871 Unable to deploy Tapestry app due to classloading issue

The CL to be used is the Geronimo one and not the WebappClassLoader created by Tomcat.

Modified:
    geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java?rev=396194&r1=396193&r2=396194&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
(original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/GeronimoStandardContext.java
Sat Apr 22 18:56:21 2006
@@ -16,6 +16,7 @@
  */
 package org.apache.geronimo.tomcat;
 
+import java.beans.PropertyChangeListener;
 import java.io.IOException;
 import java.util.Iterator;
 import java.util.List;
@@ -29,6 +30,7 @@
 
 import org.apache.catalina.Container;
 import org.apache.catalina.LifecycleException;
+import org.apache.catalina.Loader;
 import org.apache.catalina.Manager;
 import org.apache.catalina.Valve;
 import org.apache.catalina.Wrapper;
@@ -261,7 +263,73 @@
         super.addChild(child);
     }
 
+    public synchronized void setLoader(final Loader delegate) {
+        Loader loader = new Loader() {
+            
+            public void backgroundProcess() {
+                delegate.backgroundProcess();
+            }
+
+            public ClassLoader getClassLoader() {
+                // Implementation Note: the actual CL to be used by this 
+                // context is the Geronimo one and not the Tomcat one.
+                return parentClassLoader;
+            }
+
+            public Container getContainer() {
+                return delegate.getContainer();
+            }
+
+            public void setContainer(Container container) {
+                delegate.setContainer(container);
+            }
+
+            public boolean getDelegate() {
+                return delegate.getDelegate();
+            }
+
+            public void setDelegate(boolean delegateBoolean) {
+                delegate.setDelegate(delegateBoolean);
+            }
+
+            public String getInfo() {
+                return delegate.getInfo();
+            }
+
+            public boolean getReloadable() {
+                return false;
+            }
 
+            public void setReloadable(boolean reloadable) {
+                if (reloadable) {
+                    throw new UnsupportedOperationException("Reloadable context is not supported.");
+                }
+            }
+
+            public void addPropertyChangeListener(PropertyChangeListener listener) {
+                delegate.addPropertyChangeListener(listener);
+            }
+
+            public void addRepository(String repository) {
+                delegate.addRepository(repository);
+            }
+
+            public String[] findRepositories() {
+                return delegate.findRepositories();
+            }
+
+            public boolean modified() {
+                return delegate.modified();
+            }
+
+            public void removePropertyChangeListener(PropertyChangeListener listener) {
+                delegate.removePropertyChangeListener(listener);
+            }
+        };
+        
+        super.setLoader(loader);
+    }
+    
     private class SystemMethodValve extends ValveBase {
 
         public void invoke(Request request, Response response) throws IOException, ServletException
{



Mime
View raw message