Converting non-OSGi JDBC drivers into OSGi-compliant bundles
In Chapter 3, Advanced JPA Support in Spring Roo we discussed that the database reverse engineering process of Roo requires the JDBC driver for the database to be available as an OSGi bundle. In this recipe, we'll look at how to convert H2 database's JDBC driver into a OSGi bundle using the addon
create
wrapper
command and use it in database reverse engineering.
Getting ready
Download the H2 database bundled as a ZIP file from , and unzip it to the C:\roo-cookbook\
directory. Extracting the H2 database ZIP file will create a directory named h2
inside the C:\roo-cookbook
directory.
How to do it...
The following steps will demonstrate how to convert non-OSGi JDBC drivers into OSGi compliant bundles:
Go to the
C:\roo-cookbook\h2\bin
directory and double-click theh2.bat
file. This will start the H2 database and also open H2 Console in your default web browser, as shown in the following screenshot:Make sure that you select Generic H2...