cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/hsqldb ServerImpl.java
Date Wed, 24 Jul 2002 03:38:46 GMT
vgritsenko    2002/07/23 20:38:46

  Modified:    src/java/org/apache/cocoon/components/hsqldb Tag:
                        cocoon_2_0_3_branch ServerImpl.java
  Log:
  update hsqldb; implement proper shutdown
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.10.2.1  +7 -11     xml-cocoon2/src/java/org/apache/cocoon/components/hsqldb/ServerImpl.java
  
  Index: ServerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/hsqldb/ServerImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.10.2.1
  diff -u -r1.10 -r1.10.2.1
  --- ServerImpl.java	22 Feb 2002 07:00:07 -0000	1.10
  +++ ServerImpl.java	24 Jul 2002 03:38:45 -0000	1.10.2.1
  @@ -112,6 +112,8 @@
           arguments[3] = params.getParameter("silent","true");
           arguments[4] = "-trace";
           arguments[5] = params.getParameter("trace","false");
  +        arguments[4] = "-no_system_exit";
  +        arguments[5] = "true";
           if (this.getLogger().isDebugEnabled()) {
               this.getLogger().debug("Configure ServerImpl with port: " + arguments[1]
                       + ", silent: " + arguments[3]
  @@ -162,10 +164,7 @@
       /** Stop the server */
       public void stop() {
           if (started) {
  -            // TODO: Execute shutdown. Now HSQLDB have a System.exit() call
  -/*
               try {
  -                System.out.println("Shutting down HSQLDB");
                   getLogger().debug("Shutting down HSQLDB");
                   Connection connection = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost:"
+ this.port, "sa", "");
                   Statement statement = connection.createStatement();
  @@ -173,14 +172,12 @@
                   try {
                       connection.close();
                   } catch (SQLException e) {
  -                    System.out.println("Shutting down HSQLDB: Ignoring exception: " + e);
  +                    getLogger().debug("Shutting down HSQLDB: Ignoring exception: " + e);
                   }
               } catch (Exception e){
  -                System.out.println("Shutting down HSQLDB: Exception.");
  -                e.printStackTrace();
  +                getLogger().error("Error while shutting down HSQLDB", e);
               }
  -            System.out.println("Shutting down HSQLDB: Done");
  -*/
  +            getLogger().debug("Shutting down HSQLDB: Done");
           }
       }
   
  @@ -196,8 +193,7 @@
   
                   org.hsqldb.Server.main(arguments);
               } catch(Exception e){
  -                System.out.println("run got exception: ");
  -                e.printStackTrace();
  +                getLogger().error("Got exception", e);
               } finally {
                   started = false;
               }
  
  
  

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


Mime
View raw message