cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: Reunning separate instances of Cocoon in the same JVM (patch)
Date Wed, 13 Dec 2000 11:46:16 GMT
Thanks Nicolas. The first two patches were good. However I don't see the 
point of this one. You see, this classpath setting only affects the 
compiler, not the classloader. You will not be able to prevent class loading 
conflicts using this patch, and you will not be able to add anything to the 
classpath that isn't already there.

Nicolás Lichtmaier <nick@technisys.com.ar>
>And finally, the last patch!
>
>The idea is to add the Apache JServ zone file a new property, that will 
>override
>the "extra classpath" that is prepended to the system one.
>
>So setting:
>
>servlet.org.apache.cocoon.Cocoon.initArgs=processor.xsp.localclasspath=/home/nic
>k/src/java:/home/nick/src/xml-cocoon/build/classes:/usr/local/share/java/fop_0_1
>3_0.jar:/usr/local/share/java/xerces_1_2.jar:/usr/local/share/java/xalan_1_2_D02
>.jar:/usr/local/share/java/xml.jar:/usr/local/share/java/turbine-pool.jar
>
>... I can now make all the people work in the same JVM+Apache+JServ with
>different Cocoons (maybe different versions), and different classpaths.
>
>I havem't tested this extensively, there might be other places that access 
>systemn
>properties.. I don't know...
>
>Index: XSPProcessor.java
>===================================================================
>RCS file: 
>/home/cvspublic/xml-cocoon/src/org/apache/cocoon/processor/xsp/XSPProcessor.java,v
>retrieving revision 1.33
>diff -u -r1.33 XSPProcessor.java
>--- XSPProcessor.java	2000/12/01 23:36:44	1.33
>+++ XSPProcessor.java	2000/12/13 02:02:20
>@@ -214,11 +214,15 @@
>     // Languages other than Java may also need to use the classpath to 
>link to Java code
>     // Try to get the classpath from catalina or tomcat first; if that 
>fails use the
>     // standard one.
>-    String classpath = (String)
>-      
>this.servletContext.getAttribute("org.apache.catalina.jsp_classpath");
>+    String classpath = (String) conf.get("localclasspath");
>+    System.err.println("conf="+conf);
>     if (classpath == null) {
>-      classpath = (String)
>-        
>this.servletContext.getAttribute("org.apache.tomcat.jsp_classpath");
>+	classpath = (String)
>+	 this.servletContext.getAttribute("org.apache.catalina.jsp_classpath");
>+	if (classpath == null) {
>+	    classpath = (String)
>+	     this.servletContext.getAttribute("org.apache.tomcat.jsp_classpath");
>+	}
>     }
>     if (classpath == null)
>       classpath = "";
>
>

_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com


Mime
View raw message