This closes #850

This commit is contained in:
Clebert Suconic 2016-10-19 15:37:28 -04:00
commit c65e8d4bfb
3 changed files with 4 additions and 7 deletions

View File

@ -104,6 +104,9 @@ public interface ActiveMQMessageBundle {
value = "Did not receive data from {0} within the {1}ms connection TTL. The connection will now be closed.", format = Message.Format.MESSAGE_FORMAT) value = "Did not receive data from {0} within the {1}ms connection TTL. The connection will now be closed.", format = Message.Format.MESSAGE_FORMAT)
ActiveMQConnectionTimedOutException clientExited(String remoteAddress, long ttl); ActiveMQConnectionTimedOutException clientExited(String remoteAddress, long ttl);
@Message(id = 119015, value = "Must specify a name for each divert. This one will not be deployed.", format = Message.Format.MESSAGE_FORMAT)
ActiveMQInternalErrorException divertWithNoName();
@Message(id = 119017, value = "Queue {0} does not exist", format = Message.Format.MESSAGE_FORMAT) @Message(id = 119017, value = "Queue {0} does not exist", format = Message.Format.MESSAGE_FORMAT)
ActiveMQNonExistentQueueException noSuchQueue(SimpleString queueName); ActiveMQNonExistentQueueException noSuchQueue(SimpleString queueName);

View File

@ -346,10 +346,6 @@ public interface ActiveMQServerLogger extends BasicLogger {
@Message(id = 222002, value = "Timed out waiting for pool to terminate {0}. Interrupting all its threads!", format = Message.Format.MESSAGE_FORMAT) @Message(id = 222002, value = "Timed out waiting for pool to terminate {0}. Interrupting all its threads!", format = Message.Format.MESSAGE_FORMAT)
void timedOutStoppingThreadpool(ExecutorService service); void timedOutStoppingThreadpool(ExecutorService service);
@LogMessage(level = Logger.Level.WARN)
@Message(id = 222003, value = "Must specify a name for each divert. This one will not be deployed.", format = Message.Format.MESSAGE_FORMAT)
void divertWithNoName();
@LogMessage(level = Logger.Level.WARN) @LogMessage(level = Logger.Level.WARN)
@Message(id = 222004, value = "Must specify an address for each divert. This one will not be deployed.", format = Message.Format.MESSAGE_FORMAT) @Message(id = 222004, value = "Must specify an address for each divert. This one will not be deployed.", format = Message.Format.MESSAGE_FORMAT)
void divertWithNoAddress(); void divertWithNoAddress();

View File

@ -1649,9 +1649,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
@Override @Override
public void deployDivert(DivertConfiguration config) throws Exception { public void deployDivert(DivertConfiguration config) throws Exception {
if (config.getName() == null) { if (config.getName() == null) {
ActiveMQServerLogger.LOGGER.divertWithNoName(); throw ActiveMQMessageBundle.BUNDLE.divertWithNoName();
return;
} }
if (config.getAddress() == null) { if (config.getAddress() == null) {