@Override public void onApplicationEvent(ContextRefreshedEvent event) { if (event.getApplicationContext() == applicationContext) { final String startString = config .getConfiguration(ConnectionConfiguration.CONNECTION_KEY); if (startString != null && startString.equals(ConnectionConfigurationStatus.enabled.toString())) { if (!connect()) { if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.severe("Unable to connect to the broker, force connection status to disabled"); } // change configuration status config.putConfiguration(ConnectionConfiguration.CONNECTION_KEY, ConnectionConfigurationStatus.disabled.toString()); // store changes to the configuration try { config.storeConfig(); } catch (IOException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } } } } } }
@Override public void onApplicationEvent(ContextRefreshedEvent event) { if (event.getApplicationContext() == applicationContext) { final String startString = config.getConfiguration(ConnectionConfiguration.CONNECTION_KEY); if (startString != null && startString.equals(ConnectionConfigurationStatus.enabled.toString())) { if (!connect()) { if (LOGGER.isLoggable(Level.SEVERE)) { LOGGER.severe( "Unable to connect to the broker, force connection status to disabled"); } // change configuration status config.putConfiguration( ConnectionConfiguration.CONNECTION_KEY, ConnectionConfigurationStatus.disabled.toString()); // store changes to the configuration try { config.storeConfig(); } catch (IOException e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } } } } } }
if (container.connect()) {
if (c.connect()) { fp.info("Now GeoServer is registered with the destination"); connectionInfo.getModel().setObject(