concept JDBC driver in category osgi

appears as: JDBC drivers, JDBC driver, JDBC drivers
OSGi in Depth

This is an excerpt from Manning's book OSGi in Depth.

The first issue is easily addressed by using OSGi to dynamically install bundles. But can OSGi handle the second issue? The problem is that OSGi’s import and export package specification is static. At compilation time, the federated database OSGi bundle doesn’t know in advance which JDBC drivers need to be loaded; hence the bundle can’t be authored with the proper Import-Package manifest header that’s needed so that Class.forName would work. For example, to load the Derby driver, you need the following import to be present in the federated database bundle’s MANIFEST file:

In summary, a provider of JDBC drivers has to do the following to work in OSGi:

Figure 7.2. To persist an entity, an application uses javax.persistence, which finds the proper JPA provider and JDBC driver. Ultimately, the JDBC driver does the actual reading and writing to the RDBMS.
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest