提交 2c6cde93 authored 作者: Thomas Mueller's avatar Thomas Mueller

An OSGi BundleActivator is included in org.h2.util.

上级 b6405241
......@@ -5,7 +5,7 @@ Implementation-Version: ${version}
Build-Jdk: ${buildJdk}
Created-By: ${createdBy}
${mainClassTag}
Bundle-Activator: org.h2.tools.DbDriverActivator
Bundle-Activator: org.h2.util.DbDriverActivator
Bundle-Name: H2 Database Engine
Bundle-Vendor: H2 Group
Bundle-Version: ${version}
......
......@@ -4,7 +4,7 @@
* (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.tools;
package org.h2.util;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
......@@ -15,10 +15,16 @@ import org.osgi.framework.BundleContext;
*/
public class DbDriverActivator implements BundleActivator {
/**
* Start the bundle. This will load the database driver.
*/
public void start(BundleContext bundleContext) {
org.h2.Driver.load();
}
/**
* Stop the bundle. This will unload the database driver.
*/
public void stop(BundleContext bundleContext) {
org.h2.Driver.unload();
}
......
......@@ -103,6 +103,7 @@ public class Build extends BuildBase {
File.pathSeparator + "ext/servlet-api-2.4.jar" +
File.pathSeparator + "ext/lucene-core-2.2.0.jar" +
File.pathSeparator + "ext/slf4j-api-1.5.0.jar" +
File.pathSeparator + "ext/org.osgi.core-1.2.0.jar" +
File.pathSeparator + System.getProperty("java.home") + "/../lib/tools.jar";
FileList files;
if (clientOnly) {
......@@ -319,7 +320,8 @@ public class Build extends BuildBase {
"/../lib/tools.jar" +
File.pathSeparator + "ext/slf4j-api-1.5.0.jar" +
File.pathSeparator + "ext/servlet-api-2.4.jar" +
File.pathSeparator + "ext/lucene-core-2.2.0.jar",
File.pathSeparator + "ext/lucene-core-2.2.0.jar" +
File.pathSeparator + "ext/org.osgi.core-1.2.0.jar",
"-subpackages", "org.h2",
"-exclude", "org.h2.test.jaqu:org.h2.jaqu" });
......@@ -330,7 +332,8 @@ public class Build extends BuildBase {
"-classpath", System.getProperty("java.home") + "/../lib/tools.jar" +
File.pathSeparator + "ext/slf4j-api-1.5.0.jar" +
File.pathSeparator + "ext/servlet-api-2.4.jar" +
File.pathSeparator + "ext/lucene-core-2.2.0.jar",
File.pathSeparator + "ext/lucene-core-2.2.0.jar" +
File.pathSeparator + "ext/org.osgi.core-1.2.0.jar",
"-subpackages", "org.h2",
"-exclude", "org.h2.test.jaqu:org.h2.jaqu",
"-package",
......
......@@ -564,4 +564,4 @@ strictly greg germany abbreviates frontends cleversafe payload cloneable
scripting jaks reconnected serverlist safes somewhere anzo war contacts helpful
implies looping cataloguing mapper frees javaw geographic borges grass
somehow marcio groove roy gis matt targeted brazil dig opt deregister
classname recaptcha
classname recaptcha unload unloaded unloads activator
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论