You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@infoplanning.com> on 2000/12/12 17:12:29 UTC

Re: cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java

----- Original Message ----- 
From: <gr...@locus.apache.org>
To: <xm...@apache.org>
Sent: Tuesday, December 12, 2000 11:08 AM
Subject: cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java


> greenrd     00/12/12 08:08:04
> 
>    public class Cocoon extends HttpServlet implements Defaults {
>   +
>   +    // Quick workaround for Websphere bug
>   +    static {
>   +      try {
>   +        Class.forName ("com.ibm.servlet.classloader.Handler");
>   +      }
>   +      catch (Throwable t) {} // ignore
>   +    }
>    
>        Engine engine = null;
>        String message = null;
>   

This was so unnecessary and unscalable.  We have the attribute
force-load for this express purpose.  All we have to do is add
the proper attribute to the servlet init parameters and all is
well with the world!  That is why I committed that change for
parsing the "force-load" parameter!

And as a general course of action: NEVER completely ignore an
exception--log it at the very least!


Re: cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java

Posted by Berin Loritsch <bl...@infoplanning.com>.
----- Original Message ----- 
From: "Berin Loritsch" <bl...@infoplanning.com>
To: <co...@xml.apache.org>
Sent: Tuesday, December 12, 2000 11:12 AM
Subject: Re: cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java


> ----- Original Message ----- 
> From: <gr...@locus.apache.org>
> To: <xm...@apache.org>
> Sent: Tuesday, December 12, 2000 11:08 AM
> Subject: cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java
> 
> 
> > greenrd     00/12/12 08:08:04
> > 
> >    public class Cocoon extends HttpServlet implements Defaults {
> >   +
> >   +    // Quick workaround for Websphere bug
> >   +    static {
> >   +      try {
> >   +        Class.forName ("com.ibm.servlet.classloader.Handler");
> >   +      }
> >   +      catch (Throwable t) {} // ignore
> >   +    }
> >    
> >        Engine engine = null;
> >        String message = null;
> >   
> 
> This was so unnecessary and unscalable.  We have the attribute
> force-load for this express purpose.  All we have to do is add
> the proper attribute to the servlet init parameters and all is
> well with the world!  That is why I committed that change for
> parsing the "force-load" parameter!
> 
> And as a general course of action: NEVER completely ignore an
> exception--log it at the very least!

I just noticed, that this is for Cocoon 1.  See if you can back-port
the force-load parameter handling from Cocoon 2.  That way, if we
have problems with other servlet engines, we don't have to change
the code.

The exception should count.  If the parameter force-load is encountered,
and Cocoon can't load the class, then we should throw a ServletException
and abort.  If the parameter is not encountered, then it should not
be processed.