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/09/12 15:03:16 UTC

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

dims        01/09/12 06:03:16

  Modified:    src/org/apache/cocoon Tag: cocoon_20_branch Cocoon.java
  Log:
  Patch to disable HSQLDB by commenting out the hsqldb-server section in cocoon.xconf
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.9.2.19  +18 -12    xml-cocoon2/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.9.2.18
  retrieving revision 1.9.2.19
  diff -u -r1.9.2.18 -r1.9.2.19
  --- Cocoon.java	2001/09/10 10:59:58	1.9.2.18
  +++ Cocoon.java	2001/09/12 13:03:16	1.9.2.19
  @@ -58,16 +58,16 @@
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a> (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
    * @author <a href="mailto:leo.sutic@inspireinfrastructure.com">Leo Sutic</a>
  - * @version CVS $Revision: 1.9.2.18 $ $Date: 2001/09/10 10:59:58 $
  + * @version CVS $Revision: 1.9.2.19 $ $Date: 2001/09/12 13:03:16 $
    */
  -public class Cocoon 
  -        extends AbstractLoggable 
  -        implements ThreadSafe, 
  -                   Component, 
  -                   Initializable, 
  -                   Disposable, 
  -                   Modifiable, 
  -                   Processor, 
  +public class Cocoon
  +        extends AbstractLoggable
  +        implements ThreadSafe,
  +                   Component,
  +                   Initializable,
  +                   Disposable,
  +                   Modifiable,
  +                   Processor,
                      Contextualizable,
                      Composable,
                      LogKitManageable{
  @@ -224,8 +224,14 @@
           // Start the database server
           Server server = null;
           try {
  -            getLogger().debug("Starting database server");
  -            server = (Server) this.componentManager.lookup(Server.ROLE);
  +            // Check if the hsqldb server has been disabled in either cocoon.roles or cocoon.xconf
  +            Configuration children[] = conf.getChildren("hsqldb-server");
  +            if((children != null) && (children.length > 0) && this.componentManager.hasComponent(Server.ROLE)) {
  +                getLogger().debug("Starting database server");
  +                server = (Server) this.componentManager.lookup(Server.ROLE);
  +            } else {
  +                getLogger().debug("Disabled hsqldb server");
  +            }
           } catch (Exception e){
               getLogger().error("Error starting database server",e);
           } finally {
  @@ -450,7 +456,7 @@
               String[] params = request.getParameterValues(p);
               for (int i = 0; i < params.length; i++) {
                   msg.append("["+params[i]+"]");
  -                if (i != params.length-1) 
  +                if (i != params.length-1)
                   msg.append(", ");
               }
   
  
  
  

----------------------------------------------------------------------
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