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

HazelcastInstanceFactory can't instantiate custom IHazelcastInstanceLoader #21

Closed
jontejj opened this issue Feb 6, 2017 · 5 comments
Closed

Comments

@jontejj
Copy link
Contributor

jontejj commented Feb 6, 2017

java.util.Properties requires values to be strings. So (IHazelcastInstanceLoader) props.get(...) does not work. Better to treat it as a class name and instantiate the factory instead.

@emre-aydin
Copy link
Contributor

Hi @jontejj,
It is intended to be used as part of the tests, hence not documented and for internal use only. What is your use case for this, do you want to customise instance loading process?

@jontejj
Copy link
Contributor Author

jontejj commented Feb 6, 2017

We want to integrate overwriting some of the config before loading the instance. For example specifying ip:s for members in the cluster for different environments. We don't want to duplicate the config for three different environments.

@jontejj
Copy link
Contributor Author

jontejj commented Feb 6, 2017

I see now that we can use .put instead of setProperty :).

@jontejj jontejj closed this as completed Feb 6, 2017
@jontejj
Copy link
Contributor Author

jontejj commented Feb 6, 2017

Reopening this as we ran into issues with a property being a non-string. For the sake of integrating with other libraries it's better to use best practises and not store non-strings in the properties.

@jontejj jontejj reopened this Feb 6, 2017
jontejj added a commit to jontejj/hazelcast-hibernate5 that referenced this issue Feb 6, 2017
…t#21.

This is better because many third-party db libraries assume that properties in Properties are Strings, not objects.
@jontejj
Copy link
Contributor Author

jontejj commented Feb 6, 2017

I was a bit unfamiliar with how pull requests works in github, so I'll create a PR for this when #22 has been merged.

jontejj added a commit to jontejj/hazelcast-hibernate5 that referenced this issue Feb 6, 2017
…t#21.

This is better because many third-party db libraries assume that properties in Properties are Strings, not objects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants