You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by di...@apache.org on 2001/04/23 16:45:57 UTC
cvs commit: xml-cocoon/src/org/apache/cocoon/sitemap Handler.java
dims 01/04/23 07:45:57
Modified: src/org/apache/cocoon/sitemap Tag: xml-cocoon2 Handler.java
Log:
1. Hack for context class loader
2. Better Error reporting.
Revision Changes Path
No revision
No revision
1.1.2.26 +9 -2 xml-cocoon/src/org/apache/cocoon/sitemap/Attic/Handler.java
Index: Handler.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/sitemap/Attic/Handler.java,v
retrieving revision 1.1.2.25
retrieving revision 1.1.2.26
diff -u -r1.1.2.25 -r1.1.2.26
--- Handler.java 2001/04/20 20:50:14 1.1.2.25
+++ Handler.java 2001/04/23 14:45:54 1.1.2.26
@@ -43,7 +43,7 @@
*
* @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
* @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
- * @version CVS $Revision: 1.1.2.25 $ $Date: 2001/04/20 20:50:14 $
+ * @version CVS $Revision: 1.1.2.26 $ $Date: 2001/04/23 14:45:54 $
*/
public class Handler extends AbstractLoggable implements Runnable, Configurable, Composable, Contextualizable, Processor, Disposable {
private Context context;
@@ -133,6 +133,12 @@
if (!this.isRegenerationRunning) {
isRegenerationRunning = true;
regeneration = new Thread (this);
+
+ /* HACK for reducing class loader problems. */
+ /* example: xalan extensions fail if someone adds xalan jars in tomcat3.2.1/lib */
+ try {
+ regeneration.setContextClassLoader(this.getClass().getClassLoader());
+ } catch (Exception e){}
this.environment = environment;
regeneration.start();
}
@@ -144,6 +150,7 @@
regenerateAsynchronously(environment);
if (regeneration != null)
regeneration.join();
+ throwEventualException();
}
public boolean process (Environment environment)
@@ -216,7 +223,7 @@
}
public void throwEventualException() throws Exception {
- if (this.exception != null) throw this.exception;
+ if (this.exception != null) throw new ProcessingException("Exception in Handler",this.exception);
}
public Exception getException() {
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org