Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Support passing the HazelcastInstance ... via serverConfig.setServiceObject() #2

Closed
flqw opened this issue Jul 1, 2016 · 1 comment
Assignees
Milestone

Comments

@flqw
Copy link

flqw commented Jul 1, 2016

Is there a way to pass an existing HazelcastInstance to the Plugin or some workaround by initializing the Plugin myself? I have an existing instance in my application and think it's not the way to go to initialize multiple ones.

@rbygrave
Copy link
Member

rbygrave commented Jul 3, 2016

Currently there is not.

What could work is to pass a HazelcastInstance via ServerConfig get/setServiceObject(). So:

HazelcastInstance existingHazelcastInstance = ...
serverConfig.setServiceObject("hazelcast", existingHazelcastInstance);


In HzCacheFactory it uses get/setServiceObject() to read a hazelcastConfiguration ... and we could use the same mechanism to first check if a full HazelcastInstance was been supplied.

@rbygrave rbygrave self-assigned this Jul 3, 2016
@rbygrave rbygrave changed the title Passing the HazelcastInstance ENH: Support passing the HazelcastInstance ... via serverConfig.setServiceObject() Jul 3, 2016
rbygrave added a commit that referenced this issue Jul 3, 2016
@rbygrave rbygrave added this to the 1.2.2 milestone Jul 3, 2016
@rbygrave rbygrave closed this as completed Jul 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants