Skip to content

Commit

Permalink
fix Hazelcast + Cucumber IDE tests throw ApplicationContextException
Browse files Browse the repository at this point in the history
  • Loading branch information
Tezcan committed Apr 10, 2017
1 parent 2148473 commit f7bba5c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ public CacheManager cacheManager(HazelcastInstance hazelcastInstance) {
@Bean
public HazelcastInstance hazelcastInstance(JHipsterProperties jHipsterProperties) {
log.debug("Configuring Hazelcast");

HazelcastInstance hazelCastInstance = Hazelcast.getHazelcastInstanceByName("<%=baseName%>");
if (hazelCastInstance != null) {
log.debug("Hazelcast already initialized");
return hazelCastInstance;
}

Config config = new Config();
config.setInstanceName("<%=baseName%>");
<%_ if (serviceDiscoveryType) { _%>
Expand Down

0 comments on commit f7bba5c

Please sign in to comment.