I am getting below error in prod mode for (Java8+Oauth2+MySql+Hazelcast+no clustered http sessions) combination. Dev mode has worked fine.
Unable to register MBe
Two things I tried and they worked for deploying two Hikari apps in the same tomcat are: Not only change poolName(1) but also change bean name for DataSource(2) Configuration.
@Bean(destroyMethod = "shutdown")
public DataSource dataSource2() {
HikariConfig config = new HikariConfig();
config.setPoolName("AARSHikaripool-1");
Notice bean name is datasource2 while other app has datasource!!
Update for JHipster:
Since there is no datasource bean anymore, in application.yml add the following:
spring:
jmx:
default-domain: [application_name]