Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

Smack OSGi compatibilty

$
0
0

This post refers to the discussion initiated by me: http://community.igniterealtime.org/message/233292

 

Now, I have a solution regarding the OSGi compatibilty of the current Smack release 3.3.1 which seems to work perfectly, but it has to be tested. It is absolutely inline with the standalone solution. If we use Import-Package or Require-Bundle, smack.jar must be equipped with the smack.providers file. This creates a dependency between smack.jar and smackx.jar. If you want to keep both bundles isolated, we must declare smackx.jar as a Fragment-Bundle. This is the way how we can extend the classpath of smack.jar dynamically at runtime. The ProviderManager finds smack.providers and loads the classes from the Fragment-Bundle.

 

Please find attached the modified bundle versions:

  • smack_3.3.1.v20131029.jar now declares the correct Bundle-Version 3.3.1
  • smackx_3.3.1.v20131029.jar is now a Fragment-Bundle. I have corrected the Export-Package declaration. It does not make sense to export the packages from smack_3.3.1.v20131029.jar again.

 

Is this an adequate solution for the new release 3.3.2?

 

-- Update 2013-10-29 --

Eclipse is not able to detect the package export of the fragment correctly... You have to add Eclipse-ExtensibleAPI: true to the the manifest-file of the host bundle (smack_3.3.1.v20131029.jar) and Eclipse-PatchFragment: true to the fragment bundle (smackx_3.3.1.v20131029.jar). I have attached the corrected bundles.


Viewing all articles
Browse latest Browse all 10742

Trending Articles