private static final long serialVersionUID = 1L;
@Override
protected void onSubmit(AjaxRequestTarget target,
org.apache.wicket.markup.html.form.Form<?> form) {
JMSFactory factory = getJMSFactory();
if (!factory.isEmbeddedBrokerStarted()) {
try {
if (factory.startEmbeddedBroker(getConfig().getConfigurations())) {
embeddedBrokerInfo.getModel().setObject("enabled");
}
} catch (Exception e) {
if (LOGGER.isLoggable(java.util.logging.Level.SEVERE))
LOGGER.severe(e.getLocalizedMessage());
fp.error(e.getLocalizedMessage());
}
} else {
try {
if (factory.stopEmbeddedBroker()) {
embeddedBrokerInfo.getModel().setObject("disabled");
}
} catch (Exception e) {
if (LOGGER.isLoggable(java.util.logging.Level.SEVERE))
LOGGER.severe(e.getLocalizedMessage());