jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r650142 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
Date Mon, 21 Apr 2008 13:38:08 GMT
Author: thomasm
Date: Mon Apr 21 06:37:57 2008
New Revision: 650142

URL: http://svn.apache.org/viewvc?rev=650142&view=rev
Log:
JCR-1546: H2PersistenceManager: no need to call shutdown; javadoc bugs

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java?rev=650142&r1=650141&r2=650142&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
Mon Apr 21 06:37:57 2008
@@ -26,20 +26,22 @@
 /**
  * Extends the {@link BundleDbPersistenceManager} by H2 specific code.
  * <p/>
- * Configuration:<br>
- * <ul>
- * <li>&lt;param name="{@link #setBundleCacheSize(String) bundleCacheSize}" value="8"/>
- * <li>&lt;param name="{@link #setConsistencyCheck(String) consistencyCheck}" value="false"/>
- * <li>&lt;param name="{@link #setMinBlobSize(String) minBlobSize}" value="16384"/>
- * <li>&lt;param name="{@link #setDriver(String) driver}" value="org.hsqldb.jdbcDriver"/>
- * <li>&lt;param name="{@link #setUrl(String) url}" value="jdbc:hsqldb:file:${wsp.home}/db/itemState"/>
- * <li>&lt;param name="{@link #setUser(String) user}" value="sa"/>
- * <li>&lt;param name="{@link #setPassword(String) password}" value=""/>
- * <li>&lt;param name="{@link #setSchema(String) schema}" value="native"/>
- * <li>&lt;param name="{@link #setSchemaObjectPrefix(String) schemaObjectPrefix}"
value=""/>
- * <li>&lt;param name="{@link #setErrorHandling(String) errorHandling}" value=""/>
- * <li>&lt;param name="{@link #setLockTimeout(String)} (String) lockTimeout}" value="10000"/>
- * </ul>
+ * Configuration:
+ * <pre>
+ * &lt;PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.H2PersistenceManager">
+ *     &lt;param name="{@link #setBundleCacheSize(String) bundleCacheSize}" value="8"/>
+ *     &lt;param name="{@link #setConsistencyCheck(String) consistencyCheck}" value="false"/>
+ *     &lt;param name="{@link #setMinBlobSize(String) minBlobSize}" value="16384"/>
+ *     &lt;param name="{@link #setDriver(String) driver}" value="org.h2.Driver"/>
+ *     &lt;param name="{@link #setUrl(String) url}" value="jdbc:h2:file:${wsp.home}/db/itemState"/>
+ *     &lt;param name="{@link #setUser(String) user}" value="sa"/>
+ *     &lt;param name="{@link #setPassword(String) password}" value="sa"/>
+ *     &lt;param name="{@link #setSchema(String) schema}" value="h2"/>
+ *     &lt;param name="{@link #setSchemaObjectPrefix(String) schemaObjectPrefix}" value=""/>
+ *     &lt;param name="{@link #setErrorHandling(String) errorHandling}" value=""/>
+ *     &lt;param name="{@link #setLockTimeout(String) lockTimeout}" value="10000"/>
+ * &lt;/PersistenceManager>
+ * <pre>
  */
 public class H2PersistenceManager extends BundleDbPersistenceManager {
 
@@ -63,7 +65,7 @@
     }
 
     /**
-     * Creates a new h2 persistence manager.
+     * Creates a new H2 persistence manager.
      */
     public H2PersistenceManager() {
     }
@@ -106,23 +108,6 @@
             stmt.close();
         }
         super.checkSchema();
-    }
-
-    /**
-     * @see PersistenceManager#close
-     */
-    public synchronized void close() throws Exception {
-        if (!initialized) {
-            throw new IllegalStateException("not initialized");
-        }
-        if (getUrl().startsWith("jdbc:h2:file:")) {
-            // have to explicitly shutdown in-proc h2
-            Statement stmt = connectionManager.getConnection().createStatement();
-            stmt.execute("shutdown");
-            stmt.close();
-        }
-        // call base class implementation
-        super.close();
     }
 
 }



Mime
View raw message