Package org.h2.util
Class DbDriverActivator
- java.lang.Object
-
- org.h2.util.DbDriverActivator
-
- All Implemented Interfaces:
org.osgi.framework.BundleActivator
public class DbDriverActivator extends java.lang.Object implements org.osgi.framework.BundleActivator
The driver activator loads the H2 driver when starting the bundle. The driver is unloaded when stopping the bundle.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
DATASOURCE_FACTORY_CLASS
-
Constructor Summary
Constructors Constructor Description DbDriverActivator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
start(org.osgi.framework.BundleContext bundleContext)
Start the bundle.void
stop(org.osgi.framework.BundleContext bundleContext)
Stop the bundle.
-
-
-
Field Detail
-
DATASOURCE_FACTORY_CLASS
private static final java.lang.String DATASOURCE_FACTORY_CLASS
- See Also:
- Constant Field Values
-
-
Method Detail
-
start
public void start(org.osgi.framework.BundleContext bundleContext)
Start the bundle. If the 'org.osgi.service.jdbc.DataSourceFactory' class is available in the class path, this will load the database driver and register the DataSourceFactory service.- Specified by:
start
in interfaceorg.osgi.framework.BundleActivator
- Parameters:
bundleContext
- the bundle context
-
stop
public void stop(org.osgi.framework.BundleContext bundleContext)
Stop the bundle. This will unload the database driver. The DataSourceFactory service is implicitly un-registered by the OSGi framework.- Specified by:
stop
in interfaceorg.osgi.framework.BundleActivator
- Parameters:
bundleContext
- the bundle context
-
-