}
}
}
private boolean refreshBrokerServiceCObj(BrokerServiceCObj bSvcCObj) {
ServiceInfo oldSvcInfo = bSvcCObj.getServiceInfo();
BrokerAdmin ba = bSvcCObj.getBrokerAdmin();
/*
* Broker may take more time to complete the task than the specified
* timeout value.
* This value is used when refreshing the console in such cases.
*/
if (!ba.isBusy())
ba.setAssociatedObj(bSvcCObj);
Vector svc = null;
try {
ba.sendGetServicesMessage(oldSvcInfo.name);
/*
* False because users do not need to know whether
* or not the operation had succeeded after timeout.
*/
svc = ba.receiveGetServicesReplyMessage(false);
} catch (BrokerAdminException baex) {
JOptionPane.showOptionDialog(app.getFrame(),
acr.getString(acr.E_RETRIEVE_SVC, oldSvcInfo.name) +
printBrokerAdminExceptionDetails(baex),
acr.getString(acr.I_BROKER_SVC_PROPS) + ": " +
acr.getString(acr.I_ERROR_CODE,
AdminConsoleResources.E_RETRIEVE_SVC),
JOptionPane.YES_NO_OPTION,
JOptionPane.ERROR_MESSAGE, null, close, close[0]);
return false;
}
if ((svc != null) && (svc.size() == 1)) {
Enumeration e = svc.elements();
ServiceInfo sInfo = (ServiceInfo)e.nextElement();
bSvcCObj.setServiceInfo(sInfo);
return true;
}
return false;
}