window.hide();
// default values
entity.setUseGlobalPools(true);
ModelNode address = Baseadress.get();
address.add("subsystem", "messaging");
address.add("hornetq-server", getCurrentServer());
address.add("connection-factory", entity.getName());
ModelNode operation = factoryAdapter.fromEntity(entity);
operation.get(ADDRESS).set(address);
operation.get(OP).set(ADD);
// jndi names
operation.get("entries").setEmptyList();
operation.get("entries").add(entity.getJndiName());
// TODO: https://issues.jboss.org/browse/AS7-4377
ModelNode connector = new ModelNode();
connector.get(entity.getConnector()).set(ModelType.UNDEFINED);
operation.get("connector").set(connector);
dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>() {
@Override
public void onSuccess(DMRResponse result) {
ModelNode response =result.get();
if(response.isFailure())
Console.error(Console.MESSAGES.addingFailed("Connection Factory " + entity.getName()), response.getFailureDescription());
else
Console.info(Console.MESSAGES.added("Connection Factory " + entity.getName()));
loadJMSConfig();
}