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

Made the project OSGI compliant #13

Merged
merged 1 commit into from
Sep 23, 2015
Merged

Conversation

yannickdeturck
Copy link
Contributor

I made the project OSGi compliant in order to be able to use it in an OSGi environment.

@stain stain merged commit 9705610 into jai-imageio:master Sep 23, 2015
stain added a commit that referenced this pull request Sep 23, 2015
@stain
Copy link
Member

stain commented Sep 23, 2015

Thank you! I have merged this pull request, but didn't include the unneeded <dependency> for the osgi modules.

Did you get the ServiceLoader for the SPIs to work under OSGi?

@stain stain mentioned this pull request Sep 23, 2015
stain added a commit to jai-imageio/jai-imageio-jpeg2000 that referenced this pull request Sep 23, 2015
@yannickdeturck
Copy link
Contributor Author

Hi Stian,
I've used the library for a PoC at my client. Unfortunately the decision was made to leave out the feature in our application so I never got around to test it in our OSGi environment.

@nicolas-f
Copy link

Hi,
Thanks for the patch.
As we will use this project in our GPL project H2GIS and OrbisGIS. We will test it in an OSGi framework.
Regards,

Nicolas Fortin
Lab-STICC – CNRS UMR 6285 et Ecole Centrale de Nantes
GIS http://orbisgis.org
Spatial DB http://h2gis.org
Noise http://noisemap.orbisgis.org

@stain
Copy link
Member

stain commented Oct 1, 2015

Thanks, @nicolas-f - feel free to contribute your results to issue #16 !

Here's some relevant OSGi testing framework I used in Apache Jena using pax:

https://github.com/apache/jena/tree/master/apache-jena-osgi/jena-osgi-test

@stain
Copy link
Member

stain commented Oct 1, 2015

See also the release candidate 1.3.1 at #17 - feel free to test it and vote!

@nicolas-f
Copy link

Hello,

I resolved the service exports of SPI through SPI-Provider and Provide-Capability manifest tag. With the usage of Apache Aries. https://github.com/nicolas-f/h2database/blob/georaster_patch/h2/src/main/META-INF/MANIFEST.MF#L66

However I'm facing problems in the SPI consumer side. ImageIO does not found provider in other bundles..

@kojotak
Copy link

kojotak commented Nov 2, 2015

Hello,

I tried the 1.3.1 bundle, but got missing exported package: sun.security.action. What do you suggest? My ideas are:

  1. edit osgi container's configuration (add system package)
  2. create fragment and expose sun.security.action: see http://spring.io/blog/2009/01/19/exposing-the-boot-classpath-in-osgi/
  3. mark sun.security.action as optional and do not use the provider capability

@stain
Copy link
Member

stain commented Nov 2, 2015

Thanks for testing!

I am not sure if sun.security.action is required or optional, I guess we
need to grep around and check. Could you try just manually editing the
manifest.mf (or pom.xml and rebuild) to make it optional?

Depending on sun.* sounds bad, but then again this code came from sun :)
On 2 Nov 2015 16:26, "Tomáš Beneda" notifications@github.com wrote:

Hello,

I tried the 1.3.1 bundle, but got missing exported package:
sun.security.action. What do you suggest? My ideas are:

  1. edit osgi container's configuration (add system package)
  2. create fragment and expose sun.security.action: see
    http://spring.io/blog/2009/01/19/exposing-the-boot-classpath-in-osgi/
  3. mark sun.security.action as optional and do not use the provider
    capability


Reply to this email directly or view it on GitHub
#13 (comment)
.

@kojotak
Copy link

kojotak commented Nov 2, 2015

Thanks for quick reply!

Package sun.security.action is mandatory. Setting it as optional allows to bypass the export-import osgi startup check, but the provider mechanism doesn't work (as expected).

I tried to programatically instantiate an image reader (TIFFImageReader for my case), but its implementation package (com.github.jaiimageio.impl.plugins.tiff) is not exported as well.

@stain
Copy link
Member

stain commented Nov 3, 2015 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants