As far as I know, H2 can be used within OSGi without much trouble
(unlike other databases), as the jar file has a Bundle-Activator (the
org.h2.util.DbDriverActivator). So... are you sure you *need* the OSGi
JDBC Services Specification?
Is there a database that _does_ support the OSGi JDBC Services
Specification out of the box? So far I found this:
https://issues.apache.org/jira/browse/ARIES-122
https://bugs.eclipse.org/bugs/show_bug.cgi?id=328310
http://laeubi-soft.de/artikel/osgi/jdbc-unter-osgi-nutzen.html
Please tell me if you are interested to create a "JDBC Services
Specification" patch for H2. I wonder if it would cause no problems
for OSGi frameworks that don't support this specification.
Regards,
Thomas
> But if H2 would register itself as a JDBC service in OSGi things can be made cleaner.
Yes, of course.
> I'll see if I can make the
> implementation more complete and integrated with H2, and wrap it up as
> a patch.
That would be great! Even if the patch isn't perfect.
> I can't think of anything would break if this was added.
That's the most important aspect currently.
Thanks a lot for your help!
Regards,
Thomas
This all sounds quite complicated, and easy to get wrong.
> The best option for this is to integrate the JDBC Service interface
> into the bundle (if you can live with the OSGi licence requirements
> for this)
It sounds wrong to add an OSGi _interface_ directly to the H2 jar
file. It would be like adding java.sql.* to the H2 driver. It just
sounds wrong.
Regards,
Thomas