New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Pgjdbc an OSGi bundle #241

merged 4 commits into from Jan 5, 2015


None yet
2 participants

alexismeneses commented Jan 2, 2015

Added OSGi metadata and expose the driver as a JDBC service using dedicated DataSourceFactory of OSGi Enterprise.

This fixes enlarged scope of issue #71 and a related conversation thread

The bundle version is defined in file. We may need to do something more generic concerning version computation so as to keep all versions aligned (maven version, osgi version, ant tokens, ...).

Imported and exported packages are computed automatically using bnd tool so as to reduce the maintenance cost of metadatas.

For the need of the bundle activator, the driver is now able to deregister from the driver manager (in case the bundle is stopped/unloaded). In addition to this case, deregistering methods may be used in some other situations where class unloading is expected (JEE containers for example).

There is now a compile time dependency with osgi-core and osgi-enterprise, added in the maven pom as a 'provided' dependency.

alexismeneses added some commits Jan 2, 2015

Build process adds OSGi meta-information in created jar.
Import and Export packages are computed using Peter Kriens' bnd tool
Added more control on driver registration in DriverManager by exposin…
…g register/deregister/isRegistered static methods.
Fixes in OSGi meta-information building
 - Include osgi package to source pattern
 - Use latest bnd version
 - Add Require-Capability in manifest based on the edition (jdbc spec) we're building
Thanks Christopher Brown for his suggestions

davecramer added a commit that referenced this pull request Jan 5, 2015

Merge pull request #241 from alexismeneses/OSGi
Make Pgjdbc an OSGi bundle

@davecramer davecramer merged commit 7bf2136 into pgjdbc:master Jan 5, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment