mirror of https://github.com/apache/activemq.git
Throw an exception if advisory messages are disabled when creating networks
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@646409 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6b6cdaee34
commit
8bf9c17dd9
|
@ -272,6 +272,9 @@ public class BrokerService implements Service {
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public NetworkConnector addNetworkConnector(URI discoveryAddress) throws Exception {
|
public NetworkConnector addNetworkConnector(URI discoveryAddress) throws Exception {
|
||||||
|
if (!isAdvisorySupport()) {
|
||||||
|
throw new javax.jms.IllegalStateException("Networks require advisory messages to function - advisories are currently disabled");
|
||||||
|
}
|
||||||
NetworkConnector connector = new DiscoveryNetworkConnector(discoveryAddress);
|
NetworkConnector connector = new DiscoveryNetworkConnector(discoveryAddress);
|
||||||
return addNetworkConnector(connector);
|
return addNetworkConnector(connector);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue