karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gareth <gareth.o.coll...@gmail.com>
Subject Re: Cellar And Hazelcast Questions
Date Wed, 20 Jul 2011 14:43:28 GMT
Hello JB,

Thank you very much for responding so quickly!

I am just using the default cluster group (only one machine currently as I
am testing on my Mac):

karaf@root> cluster:group-list
  Node                 Group
* 192.168.190.1:5701   default

I am getting the HazelcastInstance via the service cellar creates (directly
now as I am still exploring OSGi, probably using blueprint in the future):

ServiceReference reference =
bundleContext.getServiceReference("com.hazelcast.core.HazelcastInstance");
HazelcastInstance instance = (HazelcastInstance)
bundleContext.getService(reference);
bundleContext.ungetService(reference);

Then I am looking up/creating two maps (MyKeyType and MyValueType are
defined in the same bundle -> the exception thrown below is for MyKeyType):

IMap&lt;String,Long&gt; myMap1 = hazelcastInstance.getMap("myMap1");
IMap&lt;MyKeyType,MyValueType&gt; myMap2 =
hazelcastInstance.getMap("myMap2");

Is that enough information? Am I doing anything I shouldn't be doing?

thanks in advance,
Gareth 





--
View this message in context: http://karaf.922171.n3.nabble.com/Cellar-And-Hazelcast-Questions-tp3184320p3185631.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Mime
View raw message