operation.get(OP).set("test-connection-in-pool");
dispatcher.execute(new DMRAction(operation), new AsyncCallback<DMRResponse>() {
@Override
public void onFailure(final Throwable caught) {
show(new VerifyResult(caught));
}
@Override
public void onSuccess(DMRResponse response) {
VerifyResult verifyResult;
ModelNode result = response.get();
ResponseWrapper<Boolean> wrapped = new ResponseWrapper<Boolean>(!result.isFailure(), result);
if (wrapped.getUnderlying()) {
verifyResult = new VerifyResult(true,
Console.MESSAGES.verify_datasource_successful_message(dsName));
} else {
verifyResult = new VerifyResult(false, Console.MESSAGES.verify_datasource_failed_message(dsName),
result.getFailureDescription());
}
show(verifyResult);
}