Cellar's hazelcast instance cannot be reused outside cellar
-----------------------------------------------------------
Key: KARAF-842
URL: https://issues.apache.org/jira/browse/KARAF-842
Project: Karaf
Issue Type: Bug
Components: cellar-hazelcast
Affects Versions: cellar-2.2.1, cellar-2.2.2
Reporter: Ioannis Canellos
Assignee: Ioannis Canellos
It seems that the hazelcast instance that is created by cellar, cannot be
reused outside cellar. The root cause is that the cellar-hazelcast bundle is
trying to deserialize each object that is added to the grid, in order to pass
it to the registered listeners resulting in a ClassNotFoundException.
I am currently not sure of how to deal with it. Some possible solutions are:
a) Have bundles that want to reuse the Hazelcast instance be fragments of
cellar-hazelcast bundle (don't like that much).
b) Have bundles that want to reuse the Hazelcast instance create an instance of
their own (this is also not very elegant).
c) Implement inside cellar a combined class loader as described here
http://www.osgi.org/blog/2008/08/classy-solutions-to-tricky-proxies.html and
have a listenerhook that will add the bundle class loader of each bundle that
imports the service.
d) Some other solution.
What do you think?
Here is the discussion on the mailing lists:
http://karaf.922171.n3.nabble.com/Cellar-And-Hazelcast-Questions-td3184320.html
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira