Package org.h2.util

Class 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.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DATASOURCE_FACTORY_CLASS

        private static final java.lang.String DATASOURCE_FACTORY_CLASS
        See Also:
        Constant Field Values
    • Constructor Detail

      • DbDriverActivator

        public DbDriverActivator()
    • 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 interface org.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 interface org.osgi.framework.BundleActivator
        Parameters:
        bundleContext - the bundle context