String errMsg = null;
// Default attributes of the destination
int type = DestType.DEST_TYPE_QUEUE | DestType.DEST_FLAVOR_SINGLE;
int maxMessages = -1;
SizeString maxMessageBytes = null;
SizeString maxMessageSize = null;
HAMonitorService hamonitor = Globals.getHAMonitorService();
if (hamonitor != null && hamonitor.inTakeover()) {
status = Status.ERROR;
errMsg = rb.getString(rb.E_CANNOT_PROCEED_TAKEOVER_IN_PROCESS);
logger.log(Logger.ERROR, this.getClass().getName() + ": " + errMsg);
} else if (MemoryGlobals.MEM_DISALLOW_CREATE_DEST) {
status = Status.ERROR;
errMsg = rb.W_LOW_MEM_REJECT_DEST;
} else if (info.isModified(DestinationInfo.NAME)) {
if (info.isModified(DestinationInfo.TYPE)) {
type = info.type;
}
if (info.isModified(DestinationInfo.MAX_MESSAGES)) {
maxMessages = info.maxMessages;
}
if (info.isModified(DestinationInfo.MAX_MESSAGE_BYTES)) {
maxMessageBytes = new SizeString();
maxMessageBytes.setBytes(info.maxMessageBytes);
}
if (info.isModified(DestinationInfo.MAX_MESSAGE_SIZE)) {
maxMessageSize = new SizeString();
maxMessageSize.setBytes(info.maxMessageSize);
}
} else {
status = Status.ERROR;
errMsg = rb.X_NO_DEST_NAME_SET;