Skip to content
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

Make Pgjdbc an OSGi bundle #241

merged 4 commits into from Jan 5, 2015


Copy link

@alexismeneses 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.

Import and Export packages are computed using Peter Kriens' bnd tool
…g register/deregister/isRegistered static methods.
 - 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
Make Pgjdbc an OSGi bundle
@davecramer davecramer merged commit 7bf2136 into pgjdbc:master Jan 5, 2015
1 check passed
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
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants