Database Providers
To access databases, the VIF application leverages the OSGi JDBC services described in the OSGi enterprise specifications.
To connect to a database, the VIF application needs
two bundles. The first bundle contains the vendor specific JDBC drivers (e.g. mysql-connector-java-5.1.18-bin.jar). The
second bundle registers to the application's database access
infrastructure.
By default, the VIF application can connect to MySQL and Derby databases.
If you want to connect to a different database, you have to find or create the OSGi bundle containing the JDBC drivers for this database.
In addition, you have to create the bundle that registers your connector to the application's database access infrastructure. To do this, your bundle has to provide an OSGi service implementing the org.osgi.service.jdbc.DataSourceFactory interface. The service declaration has to set the following properties: osgi.jdbc.driver.class, osgi.jdbc.driver.name and osgi.jdbc.driver.version. See the service declaration of the application's MySQL data provider for example.
After having installed these two bundles, the new database driver is displayed in the list of available database drivers on the application's configuration page.