Amazing stuff going on here :-) Decision has been taken to keep the existing singleton facade but adding new APIs beside it when needed - like in this case. Just keep in mind that memorystorage is also a singleton and a new facade has to be provided for it as well. Just go ahead as you feel and let's see how it comes up - code talks ;-)
On Wednesday, October 19, 2011, Ioannis Canellos <[email protected]> wrote: > Hi, > > I couldn't resist on assigning > DIRECTMEMORY-12<https://issues.apache.org/jira/browse/DIRECTMEMORY-12>to > my self. > I added everything that was needed to make directmemory-cache an OSGi > bundle. All of our runtime dependencies (direct & transitive) are available > as OSGi bundles so its quite easy to run directmemory inside OSGi. > I also added a new module for integration tests of directmemory in OSGi so > that we can test its runtime behavior. Currently there are pretty basic > stuff in there but more will be added soon. > > I am a bit concerned however, about the Cache object and how it initializes > itself. The fact that it acts as a singleton (not in the strict way) can > cause issues we running inside OSGi. From some integration tests, I run I > think that the Cache cannot be shared between different bundles, so each > bundle will have its own Cache. We need to deal with it if we want to > have direct memory running inside OSGi. > > I would suggest that instead of having all these statics, to have something > like a CacheFactory that could be used to create a Cache object, then we > could export this object as a service and have a shared Cache for all > bundles to use? > > What do you think? > > PS: I am really new to direct-memory, so please forgive me if I miss > something obvious here. > -- > *Ioannis Canellos* > * > FuseSource <http://fusesource.com> > > ** > Blog: http://iocanel.blogspot.com > ** > Apache Karaf <http://karaf.apache.org/> Committer & PMC > Apache ServiceMix <http://servicemix.apache.org/> Committer > Apache Gora <http://incubator.apache.org/gora/> Committer > * >
