-
1. Re: Embedding Infinispan jars into our bundle
manik Dec 3, 2010 1:39 PM (in response to yelin666)1 of 1 people found this helpfulThe former is a question for the JGroups team. They're usually on IRC (Freenode) on #jgroups or on their mailing list - https://sourceforge.net/mail/?group_id=6081
As for the LGPL, it isn't a violation to the best of my knowledge, but I am not a lawyer.
As for getting Infinispan to play nicely in an OSGi container, could you tell me which specific jars cause problems?
-
2. Re: Embedding Infinispan jars into our bundle
yelin666 Dec 3, 2010 2:59 PM (in response to manik)The ClassNotFoundException happens to different classes from time to time. Basically, org.infinispan.util.Util.loadClass(String classname) is being used in many places to load a class by name. In general, loading class by name easily leads to class loading issue in OSGi, as there is no prior knowledge on which class will be loaded and it won't be added to the Import-Package of the bundle's manifest file when the jar is wrapped into a bundle.
We actually used "DynamicImport-Package=*" for a few bundles (although it's not a good practice in OSGi), including infinispan-core, river, and marshalling-api, but still see the class loading issue come & go. So we finally decided to try embedding the jars.
-
3. Re: Embedding Infinispan jars into our bundle
gurkerl83 Dec 7, 2010 3:50 AM (in response to yelin666)Hi Lin, i read your above entries about integrating infinispan with osgi. With a bit osgi experience i would be interested in your solution. I guess you are wrapping the infinispan related jar files up in osgi bundles by adding the missing metadata. I have already done this before with a different multimodule app and i can tell it`s a hell regarding to Classloading issues only. Are your bundles available so i can take a look over, to get speed up with integrating infinispan to my current project millipede.
regards gurkerl
-
4. Re: Embedding Infinispan jars into our bundle
yelin666 Dec 8, 2010 8:42 AM (in response to gurkerl83)We're using maven, so I am using Maven Bundle Plugin (built on top of bnd tool). For Maven Bundle Plugin version 1.2.0 onwards, "embedding dependencies" feature is available (you can get more information at http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html?cf03380E65=16878693!MjA0MDI3NjQ3OmNvcnByYWRpdXNzc286ciiwRAnlTrIQRuNA/XqnBA==). Basically, I have the following snippet in my POM file (currently I excluded a few packages from Import-Package as we don't use them). The generated manifest file is as attached.
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.0.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Embed-Transitive>true</Embed-Transitive>
<Embed-Dependency>infinispan-core,river,marshalling-api,jgroups,jboss-transaction-api,rhq-pluginAnnotations</Embed-Dependency>
<Bundle-Activator>com.ge.energy.ssi.core.datagrid.osgi.Activator</Bundle-Activator>
<Private-Package>com.ge.energy.ssi.core.datagrid.infinispan</Private-Package>
<Import-Package>!bsh,!net.jcip.annotations,!org.bouncycastle.jce.provider,!org.jboss.util,!org.testng.*,!sun.reflect,*</Import-Package>
</instructions>
</configuration></plugin>
-
MANIFEST.MF 2.3 KB
-