made it possible to disable advisory message support for AMQ-794

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@419049 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-07-04 17:15:00 +00:00
parent 4493e89ed7
commit 466ccddc1f
1 changed files with 15 additions and 1 deletions

View File

@ -116,6 +116,7 @@ public class BrokerService implements Service, Serializable {
private String masterConnectorURI;
private JmsConnector[] jmsBridgeConnectors; //these are Jms to Jms bridges to other jms messaging systems
private boolean deleteAllMessagesOnStartup;
private boolean advisorySupport = true;
private URI vmConnectorURI;
private PolicyMap destinationPolicy;
private AtomicBoolean started = new AtomicBoolean(false);
@ -671,6 +672,17 @@ public class BrokerService implements Service, Serializable {
this.useShutdownHook = useShutdownHook;
}
public boolean isAdvisorySupport() {
return advisorySupport;
}
/**
* Allows the support of advisory messages to be disabled for performance reasons.
*/
public void setAdvisorySupport(boolean advisorySupport) {
this.advisorySupport = advisorySupport;
}
public List getTransportConnectors() {
return new ArrayList(transportConnectors);
}
@ -949,7 +961,9 @@ public class BrokerService implements Service, Serializable {
*/
protected Broker addInterceptors(Broker broker) throws Exception {
broker = new TransactionBroker(broker, getPersistenceAdapter().createTransactionStore());
if (isAdvisorySupport()) {
broker = new AdvisoryBroker(broker);
}
broker = new CompositeDestinationBroker(broker);
if (isPopulateJMSXUserID()) {
broker = new UserIDBroker(broker);