<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hi,<br><br>you might be interested that we work on this. We have just created an OSGi Declarative Services component that uses the latest Infinispan-JCache code. Well, this component is pretty primitive, there are only a couple of configuration possibilities:<br>
</div> - Clustername<br></div> - IP<br></div> - Port<br><br></div>The interface of the service that the Component implements has only one function:<br><br></div> - Cache createCache(cacheConfiguration);<br><br></div>cacheConfiguration contains some possibilities like the type (distributed/replicated), maxIdle, maxEntries, ...<br>
<br></div>We had only one problem till now. The infinispan-jcache wired to the javax.enterprise.context and some other packages, although we do not use them in the OSGi world. We made them optional in the MANIFEST.MF and uploaded it to our maven repository.<br>
<br></div>The component will be released very soon (within days) at GitHub. It will be part of our OpenSource framework. Every other components will be able to create caches for themselves based on the cacheFactory component.<br>
<br></div><div>If you are interested, I will keep you up-to-date on this mailing list.<br><br></div><div>Btw.: This is the MANIFEST we use in infinispan-jcache that made everything work (till now) (look for the word &quot;optional&quot; to see what we had to change): <br>
</div><div><br><span style="font-family:courier new,monospace">Import-Package: javax.cache;version=&quot;[1.0,2)&quot;,javax.cache.annotation;ver
<br> sion=&quot;[1.0,2)&quot;,javax.cache.configuration,javax.cache.event;version=&quot;[1.
<br> 0,2)&quot;,javax.cache.expiry,javax.cache.integration,javax.cache.management
<br> ,javax.cache.processor,javax.cache.spi;version=&quot;[1.0,2)&quot;,javax.enterpri
<br> se.context;resolution:=optional,javax.enterprise.context.spi;resolution
<br> :=optional,javax.enterprise.event;resolution:=optional,javax.enterprise
<br> .inject;resolution:=optional,javax.enterprise.inject.spi;resolution:=op
<br> tional,javax.inject;resolution:=optional,javax.interceptor;resolution:=
<br> optional,javax.management,javax.naming,javax.transaction;version=&quot;[1.1,
<br> 2)&quot;,javax.transaction.xa;version=&quot;[1.1,2)&quot;,javax.xml.namespace,org.infi
<br> nispan;version=&quot;[6.0,7)&quot;,org.infinispan.cdi;resolution:=optional;versio
<br> n=&quot;[6.0,7)&quot;,org.infinispan.commands;version=&quot;[6.0,7)&quot;,<a href="http://org.infinispan.co">org.infinispan.co</a>
<br> mmands.read;version=&quot;[6.0,7)&quot;,org.infinispan.commands.tx;version=&quot;[6.0,
<br> 7)&quot;,org.infinispan.commons;version=&quot;[6.0,7)&quot;,org.infinispan.commons.api
<br> ;version=&quot;[6.0,7)&quot;,org.infinispan.commons.configuration;version=&quot;[6.0,7
<br> )&quot;,org.infinispan.commons.marshall;version=&quot;[6.0,7)&quot;,<a href="http://org.infinispan.com">org.infinispan.com</a>
<br> mons.util;version=&quot;[6.0,7)&quot;,org.infinispan.commons.util.concurrent;vers
<br> ion=&quot;[6.0,7)&quot;,org.infinispan.configuration.cache;version=&quot;[6.0,7)&quot;,org.
<br> infinispan.configuration.global;version=&quot;[6.0,7)&quot;,org.infinispan.config
<br> uration.parsing;version=&quot;[6.0,7)&quot;,org.infinispan.container;version=&quot;[6.
<br> 0,7)&quot;,org.infinispan.container.entries;version=&quot;[6.0,7)&quot;,org.infinispan
<br> .container.versioning;version=&quot;[6.0,7)&quot;,org.infinispan.context;version=
<br> &quot;[6.0,7)&quot;,org.infinispan.factories;version=&quot;[6.0,7)&quot;,<a href="http://org.infinispan.int">org.infinispan.int</a>
<br> erceptors;version=&quot;[6.0,7)&quot;,org.infinispan.interceptors.base;version=&quot;[
<br> 6.0,7)&quot;,org.infinispan.jmx;version=&quot;[6.0,7)&quot;,org.infinispan.lifecycle;v
<br> ersion=&quot;[6.0,7)&quot;,org.infinispan.manager;version=&quot;[6.0,7)&quot;,org.infinispa
<br> n.marshall.core;version=&quot;[6.0,7)&quot;,org.infinispan.metadata;version=&quot;[6.0
<br> ,7)&quot;,org.infinispan.notifications;version=&quot;[6.0,7)&quot;,org.infinispan.noti
<br> fications.cachelistener.annotation;version=&quot;[6.0,7)&quot;,org.infinispan.not
<br> ifications.cachelistener.event;version=&quot;[6.0,7)&quot;,org.infinispan.persist
<br> ence.manager;version=&quot;[6.0,7)&quot;,org.infinispan.persistence.spi;version=&quot;
<br> [6.0,7)&quot;,org.infinispan.persistence.support;version=&quot;[6.0,7)&quot;,org.infin
<br> ispan.remoting;version=&quot;[6.0,7)&quot;,org.infinispan.remoting.transport;vers
<br> ion=&quot;[6.0,7)&quot;,org.infinispan.remoting.transport.jgroups;version=&quot;[6.0,7
<br> )&quot;,org.infinispan.stats;version=&quot;[6.0,7)&quot;,org.infinispan.transaction;ve
<br> rsion=&quot;[6.0,7)&quot;,org.infinispan.transaction.xa;version=&quot;[6.0,7)&quot;,org.inf
<br> inispan.transaction.xa.recovery;version=&quot;[6.0,7)&quot;,org.infinispan.util;v
<br> ersion=&quot;[6.0,7)&quot;,org.infinispan.util.concurrent;version=&quot;[6.0,7)&quot;,org.i
<br> nfinispan.util.concurrent.locks.containers;version=&quot;[6.0,7)&quot;,org.infini
<br> span.util.logging;version=&quot;[6.0,7)&quot;,org.jboss.logging;version=&quot;[3.1,4)&quot;
<br> ,org.jgroups;version=&quot;[3.4,4)&quot;</span><br><br></div>Regards,<br><div class="gmail_extra"><br clear="all"><div><div>Balazs Zsoldos</div><div>Software Architect</div><div>Mobile: +36-70/594-92-34</div><div><br>
</div><div>Everit Kft.</div><div><a href="https://www.everit.biz/" target="_blank">https://www.everit.biz</a></div><div><br></div><div>Everit OpenSource</div><div><a href="http://everit.org" target="_blank">http://everit.org</a></div>
</div>
<br><br><div class="gmail_quote">On Fri, Dec 6, 2013 at 4:57 PM, Randall Hauch <span dir="ltr">&lt;<a href="mailto:rhauch@redhat.com" target="_blank">rhauch@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Brett, correct me if I’m wrong, but isn’t there a difference in making some library *work* in an OSGi environment and making that library *naturally fit well* in an OSGi-enabled application? For example, making the JAR’s be OSGi bundles is easy and technically makes it possible to deploy a JAR into an OSGi env, but that’s not where the payoff is. IIUC what you really want is a BundleActivator or Declarative Services [1] so that the library’s components are readily available in a naturally-OSGi way.<br>

<br>
[1] <a href="http://blog.knowhowlab.org/2010/10/osgi-tutorial-4-ways-to-activate-code.html" target="_blank">http://blog.knowhowlab.org/2010/10/osgi-tutorial-4-ways-to-activate-code.html</a><br>
<div class="HOEnZb"><div class="h5"><br>
On Dec 6, 2013, at 7:30 AM, Mircea Markus &lt;<a href="mailto:mmarkus@redhat.com">mmarkus@redhat.com</a>&gt; wrote:<br>
<br>
&gt; + infinispan-dev<br>
&gt;<br>
&gt; Thanks for offering to look into this Brett!<br>
&gt; We&#39;re already producing OSGi bundles for our modules, but these are not tested extensively so if you&#39;d review them and test them a bit would be great!<br>
&gt; Tristan can get you up to speed with this.<br>
&gt;<br>
&gt;<br>
&gt;&gt;&gt; Sanne/Galder/Pete,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Random question: what&#39;s the current state of making Infinispan OSGi friendly?  I&#39;m definitely interested in helping, if it&#39;s still a need.  This past year, I went through the exercise of making Hibernate work well in OSGi, so all of challenges (read: *many* of them) are still fairly fresh on my mind.  Plus, I&#39;d love for hibernate-infinispan to work in OSGi.<br>

&gt;&gt;&gt;<br>
&gt;&gt;&gt; If you&#39;re up for it, fill me in?  I&#39;m happy to pull everything down and start working with it.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Brett Meyer<br>
&gt;&gt;&gt; Software Engineer<br>
&gt;&gt;&gt; Red Hat, Hibernate ORM<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt; Cheers,<br>
&gt; --<br>
&gt; Mircea Markus<br>
&gt; Infinispan lead (<a href="http://www.infinispan.org" target="_blank">www.infinispan.org</a>)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; infinispan-dev mailing list<br>
&gt; <a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
<br>
<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br></div></div>