Hi, 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: - Clustername - IP - Port
The interface of the service that the Component implements has only one function: - Cache createCache(cacheConfiguration); cacheConfiguration contains some possibilities like the type (distributed/replicated), maxIdle, maxEntries, ... 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. 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. If you are interested, I will keep you up-to-date on this mailing list. Btw.: This is the MANIFEST we use in infinispan-jcache that made everything work (till now) (look for the word "optional" to see what we had to change): Import-Package: javax.cache;version="[1.0,2)",javax.cache.annotation;ver sion="[1.0,2)",javax.cache.configuration,javax.cache.event;version="[1. 0,2)",javax.cache.expiry,javax.cache.integration,javax.cache.management ,javax.cache.processor,javax.cache.spi;version="[1.0,2)",javax.enterpri se.context;resolution:=optional,javax.enterprise.context.spi;resolution :=optional,javax.enterprise.event;resolution:=optional,javax.enterprise .inject;resolution:=optional,javax.enterprise.inject.spi;resolution:=op tional,javax.inject;resolution:=optional,javax.interceptor;resolution:= optional,javax.management,javax.naming,javax.transaction;version="[1.1, 2)",javax.transaction.xa;version="[1.1,2)",javax.xml.namespace,org.infi nispan;version="[6.0,7)",org.infinispan.cdi;resolution:=optional;versio n="[6.0,7)",org.infinispan.commands;version="[6.0,7)",org.infinispan.co mmands.read;version="[6.0,7)",org.infinispan.commands.tx;version="[6.0, 7)",org.infinispan.commons;version="[6.0,7)",org.infinispan.commons.api ;version="[6.0,7)",org.infinispan.commons.configuration;version="[6.0,7 )",org.infinispan.commons.marshall;version="[6.0,7)",org.infinispan.com mons.util;version="[6.0,7)",org.infinispan.commons.util.concurrent;vers ion="[6.0,7)",org.infinispan.configuration.cache;version="[6.0,7)",org. infinispan.configuration.global;version="[6.0,7)",org.infinispan.config uration.parsing;version="[6.0,7)",org.infinispan.container;version="[6. 0,7)",org.infinispan.container.entries;version="[6.0,7)",org.infinispan .container.versioning;version="[6.0,7)",org.infinispan.context;version= "[6.0,7)",org.infinispan.factories;version="[6.0,7)",org.infinispan.int erceptors;version="[6.0,7)",org.infinispan.interceptors.base;version="[ 6.0,7)",org.infinispan.jmx;version="[6.0,7)",org.infinispan.lifecycle;v ersion="[6.0,7)",org.infinispan.manager;version="[6.0,7)",org.infinispa n.marshall.core;version="[6.0,7)",org.infinispan.metadata;version="[6.0 ,7)",org.infinispan.notifications;version="[6.0,7)",org.infinispan.noti fications.cachelistener.annotation;version="[6.0,7)",org.infinispan.not ifications.cachelistener.event;version="[6.0,7)",org.infinispan.persist ence.manager;version="[6.0,7)",org.infinispan.persistence.spi;version=" [6.0,7)",org.infinispan.persistence.support;version="[6.0,7)",org.infin ispan.remoting;version="[6.0,7)",org.infinispan.remoting.transport;vers ion="[6.0,7)",org.infinispan.remoting.transport.jgroups;version="[6.0,7 )",org.infinispan.stats;version="[6.0,7)",org.infinispan.transaction;ve rsion="[6.0,7)",org.infinispan.transaction.xa;version="[6.0,7)",org.inf inispan.transaction.xa.recovery;version="[6.0,7)",org.infinispan.util;v ersion="[6.0,7)",org.infinispan.util.concurrent;version="[6.0,7)",org.i nfinispan.util.concurrent.locks.containers;version="[6.0,7)",org.infini span.util.logging;version="[6.0,7)",org.jboss.logging;version="[3.1,4)" ,org.jgroups;version="[3.4,4)" Regards, Balazs Zsoldos Software Architect Mobile: +36-70/594-92-34 Everit Kft. https://www.everit.biz Everit OpenSource http://everit.org On Fri, Dec 6, 2013 at 4:57 PM, Randall Hauch <[email protected]> wrote: > 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. > > [1] > http://blog.knowhowlab.org/2010/10/osgi-tutorial-4-ways-to-activate-code.html > > On Dec 6, 2013, at 7:30 AM, Mircea Markus <[email protected]> wrote: > > > + infinispan-dev > > > > Thanks for offering to look into this Brett! > > We're already producing OSGi bundles for our modules, but these are not > tested extensively so if you'd review them and test them a bit would be > great! > > Tristan can get you up to speed with this. > > > > > >>> Sanne/Galder/Pete, > >>> > >>> Random question: what's the current state of making Infinispan OSGi > friendly? I'm definitely interested in helping, if it'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'd love for hibernate-infinispan to work in OSGi. > >>> > >>> If you're up for it, fill me in? I'm happy to pull everything down > and start working with it. > >>> > >>> Brett Meyer > >>> Software Engineer > >>> Red Hat, Hibernate ORM > >>> > >> > > > > Cheers, > > -- > > Mircea Markus > > Infinispan lead (www.infinispan.org) > > > > > > > > > > > > _______________________________________________ > > infinispan-dev mailing list > > [email protected] > > https://lists.jboss.org/mailman/listinfo/infinispan-dev > > > _______________________________________________ > infinispan-dev mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/infinispan-dev >
_______________________________________________ infinispan-dev mailing list [email protected] https://lists.jboss.org/mailman/listinfo/infinispan-dev
