private BrokerDestCObj addDestination(BrokerCObj bCObj, BrokerAdminEvent bae) {
BrokerDestCObj bDestCObj;
DestinationInfo destInfo = createDestination(bae);
BrokerAdmin ba = bCObj.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(bCObj);
String destName = destInfo.name;
try {
ba.sendCreateDestinationMessage(destInfo);
ba.receiveCreateDestinationReplyMessage();
bDestCObj = new BrokerDestCObj(bCObj, destInfo);
app.getStatusArea().appendText
(acr.getString(acr.S_BROKER_DEST_ADD, destInfo.name, ba.getKey()));
} catch (BrokerAdminException baex) {
JOptionPane.showOptionDialog(app.getFrame(),
acr.getString(acr.E_ADD_DEST_BROKER, destName, ba.getKey()) +
printBrokerAdminExceptionDetails(baex),
acr.getString(acr.I_ADD_BROKER_DEST) + ": " +
acr.getString(acr.I_ERROR_CODE,
AdminConsoleResources.E_ADD_DEST_BROKER),
JOptionPane.YES_NO_OPTION,