clickhouse-java icon indicating copy to clipboard operation
clickhouse-java copied to clipboard

OSGi-Support

Open stbischof opened this issue 3 years ago • 4 comments

Use case

  1. I want to run the clickhouse jdbc drivers inside an OSGi Framework.
  2. I would like to use the OSGi -pecifies DatasourceFactory.

Describe the solution you'd like

  1. Use bnd-jar-plugin to generate a proper Manifest.MF file that is needed for OSGI-Bundles(jars)
  2. Implement the DatasourceFactory.

Describe alternatives you've considered

write manifest by hand

Additional context

I could make a PR if someone i get green light for this.

stbischof avatar Apr 21 '22 13:04 stbischof

Thanks @stbischof, it would be great if you can come with up a PR and I'll be happy to merge it :)

zhicwu avatar Apr 21 '22 13:04 zhicwu

I am currently working on some improvements with bnd to generate the manifest. How important is the java 9 support for you? what is the minimum target version? And do you really need this multi version support?

stbischof avatar Apr 22 '22 08:04 stbischof

How important is the java 9 support for you?

JMPS was introduced since JDK 9 - that's the only reason of put module-info.java under java9 directory, in case someone uses JDK 9(in most cases should be one of 8, 11 and 17). I guess we can change to 11 if that helps.

what is the minimum target version?

JDK 8. I hope we can upgrade to 11 in 0.4.

And do you really need this multi version support?

It's still important because I'm testing Vector API, which was introduced since JDK 16, revised in 17. In my local, I added java17 directory and will check in if the performance is really good. Anyway, I think you can create a shaded jar like this for JDK 8+ without consideration of 9, 11 or 17.

zhicwu avatar Apr 22 '22 09:04 zhicwu

i will do it with target java 11 thank you for the moment.

stbischof avatar Apr 22 '22 12:04 stbischof