Author: sgoeschl
Date: Tue Dec  1 22:37:23 2009
New Revision: 885980

URL: http://svn.apache.org/viewvc?rev=885980&view=rev
Log:
Preparing first release

Added:
    turbine/fulcrum/trunk/hsqldb/NOTICE.txt
    turbine/fulcrum/trunk/hsqldb/pom.xml
Modified:
    turbine/fulcrum/trunk/hsqldb/project.xml
    
turbine/fulcrum/trunk/hsqldb/src/java/org/apache/fulcrum/hsqldb/HSQLService.java
    
turbine/fulcrum/trunk/hsqldb/src/java/org/apache/fulcrum/hsqldb/HSQLServiceImpl.java
    turbine/fulcrum/trunk/hsqldb/src/test/TestComponentConfig.xml
    
turbine/fulcrum/trunk/hsqldb/src/test/org/apache/fulcrum/hsqldb/HSQLServiceTest.java
    turbine/fulcrum/trunk/hsqldb/src/test/test.properties
    turbine/fulcrum/trunk/hsqldb/src/test/test.script

Added: turbine/fulcrum/trunk/hsqldb/NOTICE.txt
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/hsqldb/NOTICE.txt?rev=885980&view=auto
==============================================================================
--- turbine/fulcrum/trunk/hsqldb/NOTICE.txt (added)
+++ turbine/fulcrum/trunk/hsqldb/NOTICE.txt Tue Dec  1 22:37:23 2009
@@ -0,0 +1,6 @@
+Turbine Fulcrum Spring
+Copyright 2002-2009 The Apache Software Foundation.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+

Added: turbine/fulcrum/trunk/hsqldb/pom.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/hsqldb/pom.xml?rev=885980&view=auto
==============================================================================
--- turbine/fulcrum/trunk/hsqldb/pom.xml (added)
+++ turbine/fulcrum/trunk/hsqldb/pom.xml Tue Dec  1 22:37:23 2009
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+  <parent>
+    <groupId>org.apache.fulcrum</groupId>
+    <artifactId>fulcrum-parent</artifactId>
+    <version>1</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>fulcrum-hsqldb</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <name>Fulcrum HSQLDB</name>
+  <inceptionYear>2005</inceptionYear>
+  <description>Fulcrum HSQLDB Service</description>
+  <url>http://turbine.apache.org/fulcrum/fulcrum-hsqldb</url>
+               
+  <scm>
+    
<connection>scm:svn:http://svn.apache.org/repos/asf/turbine/fulcrum/trunk/hsqldb/</connection>
+    
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/turbine/fulcrum/trunk/hsqldb/</developerConnection>
+    <url>http://svn.apache.org/viewcvs/turbine/fulcrum/trunk/hsqldb/</url>
+  </scm>
+
+  <distributionManagement>
+    <site>
+      <id>apache.website</id>
+      <name>Fulcrum Website</name>
+      
<url>${fulcrum.deployment.protocol}://people.apache.org/www/turbine.apache.org/fulcrum/fulcrum-hsqldb/</url>
+    </site>    
+  </distributionManagement>
+       
+  <developers>
+    <developer>
+      <name>Siegfried Goeschl</name>
+      <id>sgoeschl</id>
+      <email>[email protected]</email>
+      <organization />
+      <roles>
+        <role>Java Developer</role>
+      </roles>
+    </developer>
+  </developers>
+
+  <dependencies>
+    <!-- testing dependencies -->
+    <dependency>
+      <groupId>org.apache.fulcrum</groupId>
+      <artifactId>fulcrum-testcontainer</artifactId>
+      <version>1.0.6</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.fulcrum</groupId>
+      <artifactId>fulcrum-yaafi</artifactId>
+      <version>1.0.6</version>
+      <scope>test</scope>
+    </dependency>
+    <!-- project depdendencies -->
+    <dependency>
+      <groupId>org.apache.avalon.framework</groupId>
+      <artifactId>avalon-framework-api</artifactId>
+      <version>4.3.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <version>1.8.0.10</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <sourceDirectory>${basedir}/src/java</sourceDirectory>
+    <testSourceDirectory>${basedir}/src/test</testSourceDirectory>
+  </build>
+  
+  <properties>
+    <!-- This bits are used for the staging directory -->
+    <fulcrum.release.version>1.0.0</fulcrum.release.version>
+    <fulcrum.rc.version>RC1</fulcrum.rc.version>  
+  </properties>  
+  
+  <profiles>
+    <profile>
+      <id>rc</id>
+      <distributionManagement>
+        <!-- Cannot define in parent ATM, see COMMONSSITE-26 -->
+        <site>
+          <id>apache.website</id>
+          <name>Apache Fulcrum Release Candidate Staging Site</name>
+          
<url>${fulcrum.deployment.protocol}://people.apache.org/www/turbine.apache.org/builds/fulcrum/${fulcrum.componentid}/${fulcrum.release.version}/${fulcrum.rc.version}/site</url>
+        </site>
+      </distributionManagement>
+    </profile>
+  </profiles>
+  
+</project>

Modified: turbine/fulcrum/trunk/hsqldb/project.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/hsqldb/project.xml?rev=885980&r1=885979&r2=885980&view=diff
==============================================================================
--- turbine/fulcrum/trunk/hsqldb/project.xml (original)
+++ turbine/fulcrum/trunk/hsqldb/project.xml Tue Dec  1 22:37:23 2009
@@ -28,7 +28,7 @@
     <dependency>
       <groupId>hsqldb</groupId>
       <artifactId>hsqldb</artifactId>
-      <version>1.8.0.7</version>
+      <version>1.8.1.1</version>
       <url>http://hsqldb.sourceforge.net/</url>
     </dependency>
 
@@ -36,13 +36,13 @@
     <dependency>
       <groupId>fulcrum</groupId>
       <artifactId>fulcrum-testcontainer</artifactId>
-      <version>1.0.5</version>
+      <version>1.0.6</version>
     </dependency>
 
     <dependency>
       <groupId>fulcrum</groupId>
       <artifactId>fulcrum-yaafi</artifactId>
-      <version>1.0.5</version>
+      <version>1.0.6</version>
     </dependency>
 
   </dependencies>

Modified: 
turbine/fulcrum/trunk/hsqldb/src/java/org/apache/fulcrum/hsqldb/HSQLService.java
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/hsqldb/src/java/org/apache/fulcrum/hsqldb/HSQLService.java?rev=885980&r1=885979&r2=885980&view=diff
==============================================================================
--- 
turbine/fulcrum/trunk/hsqldb/src/java/org/apache/fulcrum/hsqldb/HSQLService.java
 (original)
+++ 
turbine/fulcrum/trunk/hsqldb/src/java/org/apache/fulcrum/hsqldb/HSQLService.java
 Tue Dec  1 22:37:23 2009
@@ -50,7 +50,7 @@
     public void stop() throws Exception;
 
     /**
-     * Check if the server is running
+     * Check if the database server is running.
      *
      * @return the state of the hsqldb server
      */

Modified: 
turbine/fulcrum/trunk/hsqldb/src/java/org/apache/fulcrum/hsqldb/HSQLServiceImpl.java
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/hsqldb/src/java/org/apache/fulcrum/hsqldb/HSQLServiceImpl.java?rev=885980&r1=885979&r2=885980&view=diff
==============================================================================
--- 
turbine/fulcrum/trunk/hsqldb/src/java/org/apache/fulcrum/hsqldb/HSQLServiceImpl.java
 (original)
+++ 
turbine/fulcrum/trunk/hsqldb/src/java/org/apache/fulcrum/hsqldb/HSQLServiceImpl.java
 Tue Dec  1 22:37:23 2009
@@ -49,7 +49,7 @@
  * <dt>trace</dt>
  * <dd>(true/false) a flag enabling tracing in the hsql server.</dd>
  * <dt>silent</dt>
- * <dd>(true/false) a flag to control the logging output oh thr hsql 
server.</dd>
+ * <dd>(true/false) a flag to control the logging output of the hsql 
server.</dd>
  * <dt>start</dt>
  * <dd>(true/false) when true the database is started at configuration time, 
and does
  * not need to be started under application control.</dd>
@@ -87,11 +87,6 @@
         // nothing to do
     }
 
-    public boolean isRunning() {
-        // return true id server is online
-        return server.getState() == ServerConstants.SERVER_STATE_ONLINE;
-    }
-
     /**
      * @see 
org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
      */
@@ -107,8 +102,8 @@
         this.serverProperties = new HsqlProperties();
         this.serverProperties.setProperty("server.database.0", 
cfg.getAttribute("database"));
         this.serverProperties.setProperty("server.dbname.0", 
cfg.getAttribute("dbname"));
-        this.serverProperties.setProperty("server.trace", 
cfg.getAttributeAsBoolean("trace"));
-        this.serverProperties.setProperty("server.silent", 
cfg.getAttributeAsBoolean("silent"));
+        this.serverProperties.setProperty("server.trace", 
cfg.getAttributeAsBoolean("trace", false));
+        this.serverProperties.setProperty("server.silent", 
cfg.getAttributeAsBoolean("silent", true));
         this.serverProperties.setProperty("server.port", 
cfg.getAttribute("port"));
         this.serverProperties.setProperty("server.tls", 
cfg.getAttribute("tls","false"));
     }
@@ -170,12 +165,27 @@
         this.serverProperties = null;
     }
 
+    /////////////////////////////////////////////////////////////////////////
+    // Service Interface Implementation
+    /////////////////////////////////////////////////////////////////////////
+
+    public boolean isRunning() {
+        // return true id server is online
+        return server.getState() == ServerConstants.SERVER_STATE_ONLINE;
+    }
+
+
+    /////////////////////////////////////////////////////////////////////////
+    // Service Implementation
+    /////////////////////////////////////////////////////////////////////////
+
     /**
-     * Poll the HSQLDB server for a state change
+     * Poll the HSQLDB server for a state change.
+     *
      * @param desiredState the state we are waiting for
+     * @param lim the number of 100ms iteration to wait for
      * @throws Exception something went wrong
      */
-
     private void pollForState( int desiredState, int lim )
        throws Exception
     {
@@ -197,22 +207,23 @@
             Thread.sleep(100);
         }
 
-        if( isSuccessful == false )
+        if( !isSuccessful )
         {
+
+            Throwable serverError = this.server.getServerError();
             String msg = "Unable to change the HSQLDB server to state : " + 
desiredState;
 
-            if( this.server.getServerError() != null )
+            if( serverError != null )
             {
-                this.getLogger().error( msg, this.server.getServerError() );
+                this.getLogger().error( msg, serverError );
 
-                   if( this.server.getServerError() instanceof Exception )
+                   if( serverError instanceof Exception )
                    {
-                       throw (Exception) this.server.getServerError();
+                       throw (Exception) serverError;
                    }
-
-                   if( this.server.getServerError() instanceof Throwable )
+                else
                    {
-                       throw new RuntimeException( 
this.server.getServerError().getMessage() );
+                       throw new RuntimeException( serverError.getMessage() );
                    }
             }
             else

Modified: turbine/fulcrum/trunk/hsqldb/src/test/TestComponentConfig.xml
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/hsqldb/src/test/TestComponentConfig.xml?rev=885980&r1=885979&r2=885980&view=diff
==============================================================================
--- turbine/fulcrum/trunk/hsqldb/src/test/TestComponentConfig.xml (original)
+++ turbine/fulcrum/trunk/hsqldb/src/test/TestComponentConfig.xml Tue Dec  1 
22:37:23 2009
@@ -18,5 +18,5 @@
  under the License.
 -->
 <componentConfig>
-    <HSQLService database="./src/test/test" dbname="test" trace="true" 
silent="false" port="9001" tls="false"/>
+    <HSQLService database="./src/test/test" dbname="test" trace="false" 
silent="true" port="9001" tls="false"/>
 </componentConfig>

Modified: 
turbine/fulcrum/trunk/hsqldb/src/test/org/apache/fulcrum/hsqldb/HSQLServiceTest.java
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/hsqldb/src/test/org/apache/fulcrum/hsqldb/HSQLServiceTest.java?rev=885980&r1=885979&r2=885980&view=diff
==============================================================================
--- 
turbine/fulcrum/trunk/hsqldb/src/test/org/apache/fulcrum/hsqldb/HSQLServiceTest.java
 (original)
+++ 
turbine/fulcrum/trunk/hsqldb/src/test/org/apache/fulcrum/hsqldb/HSQLServiceTest.java
 Tue Dec  1 22:37:23 2009
@@ -71,8 +71,9 @@
             );
     }
     /**
-     * Simple test that verify the select from the HSQLDB server
-     * @throws Exception
+     * Simple test that verify the select from the HSQLDB server.
+     *
+     * @throws Exception the test failed
      */
     public void testMe() throws Exception
     {
@@ -114,8 +115,6 @@
         assertFalse("Server is still running", service.isRunning());
     }
 
-    // @todo sgoeschl 2007-05-31 the SHUTDOWN sql command hangs starting with 
hsqldb-1.8.0.4
-    /**
     public void testShutdown() throws Exception {
 
         Connection conn = this.getConnection("test");
@@ -123,5 +122,4 @@
         stmt.execute("SHUTDOWN;");
         assertFalse("Server is still running", service.isRunning());
     }
-    */
 }

Modified: turbine/fulcrum/trunk/hsqldb/src/test/test.properties
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/hsqldb/src/test/test.properties?rev=885980&r1=885979&r2=885980&view=diff
==============================================================================
--- turbine/fulcrum/trunk/hsqldb/src/test/test.properties (original)
+++ turbine/fulcrum/trunk/hsqldb/src/test/test.properties Tue Dec  1 22:37:23 
2009
@@ -1,36 +1,17 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# HSQL database
-# Wed Nov 03 17:55:58 CET 2004
-hsqldb.cache_file_scale=1
-runtime.gc_interval=0
-hsqldb.first_identity=0
-version=1.7.2
-modified=no
+#HSQL Database Engine 1.8.0.10
+#Tue Dec 01 23:35:58 CET 2009
 hsqldb.script_format=0
-sql.enforce_size=false
-hsqldb.cache_size_scale=10
+runtime.gc_interval=0
+sql.enforce_strict_size=false
+hsqldb.cache_size_scale=8
+readonly=false
+hsqldb.nio_data_file=true
 hsqldb.cache_scale=14
-hsqldb.version=1.7.2
+version=1.8.0
+hsqldb.default_table_type=memory
+hsqldb.cache_file_scale=1
 hsqldb.log_size=200
-sql.enforce_strict_size=false
-readonly=true
-hsqldb.compatible_version=1.7.2
-hsqldb.original_version=1.7.2
-sql.compare_in_locale=false
-hsqldb.nio_data_file=false
+modified=no
 hsqldb.cache_version=1.7.0
+hsqldb.original_version=1.8.0
+hsqldb.compatible_version=1.8.0

Modified: turbine/fulcrum/trunk/hsqldb/src/test/test.script
URL: 
http://svn.apache.org/viewvc/turbine/fulcrum/trunk/hsqldb/src/test/test.script?rev=885980&r1=885979&r2=885980&view=diff
==============================================================================
Binary files - no diff available.


Reply via email to