You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a reason why Hazelcast doesn't have a getOrCreateHazelcastInstance() that detects a default configuration file?
If you have a Config at hand that you read from hazelcast.xml at the root of the classpath then you can either create the instance or get an existing one (using getOrCreateHazelcastInstance(Config config)). However, if you don't, then Hazelcast will always create another instance, even if the configuration URI matches.
This commit tries to clarify the sample with regards to some discussion
on the Spring Boot issue tracker, in particular:
spring-projects/spring-boot#8275
To be able to reuse an `HazelcastInstance` in server mode, the location
of the configuration file should be set in both auto-configuration
unfortunately: there is currently now way to reuse an instance that was
loaded via the default configuration. See the following issue:
hazelcast/hazelcast#10007
In a client scenario, the only way is to effectively disable the
auto-configuration which annoys me a lot. Probably Spring Boot should
back off automatically in such a scenario but we need a way to reliably
figure this out.
Also, I wasn't aware that Hazelcast provides different `CachingProvider`
that are looking for different things. IMO, there is a gap in the
caching support in Spring Boot about it and I'd be more than happy to
improve it as long as I don't need to resort to Hazelcast specific API
inside the JCache auto-configuration
Is there a reason why
Hazelcast
doesn't have agetOrCreateHazelcastInstance()
that detects a default configuration file?If you have a
Config
at hand that you read fromhazelcast.xml
at the root of the classpath then you can either create the instance or get an existing one (usinggetOrCreateHazelcastInstance(Config config)
). However, if you don't, thenHazelcast
will always create another instance, even if the configuration URI matches.Am I missing something? This relates to spring-projects/spring-boot#8467
The text was updated successfully, but these errors were encountered: