Fix order in which scheduler is used in the broker

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@925351 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2010-03-19 17:41:13 +00:00
parent cc40251451
commit 475eedc7a6
2 changed files with 5 additions and 5 deletions

View File

@ -1803,7 +1803,6 @@ public class BrokerService implements Service {
* @throws IOException
*/
protected Broker addInterceptors(Broker broker) throws Exception {
broker = new TransactionBroker(broker, getPersistenceAdapter().createTransactionStore());
if (isSchedulerSupport()) {
SchedulerBroker sb = new SchedulerBroker(broker, getSchedulerDirectoryFile());
if (isUseJmx()) {
@ -1823,6 +1822,7 @@ public class BrokerService implements Service {
}
broker = sb;
}
broker = new TransactionBroker(broker, getPersistenceAdapter().createTransactionStore());
if (isAdvisorySupport()) {
broker = new AdvisoryBroker(broker);
}

View File

@ -204,8 +204,8 @@ public class TransportConnector implements Connector, BrokerServiceAware {
brokerInfo.setBrokerId(broker.getBrokerId());
brokerInfo.setPeerBrokerInfos(broker.getPeerBrokerInfos());
brokerInfo.setFaultTolerantConfiguration(broker.isFaultTolerantConfiguration());
brokerInfo.setBrokerURL(server.getConnectURI().toString());
server.setAcceptListener(new TransportAcceptListener() {
brokerInfo.setBrokerURL(getServer().getConnectURI().toString());
getServer().setAcceptListener(new TransportAcceptListener() {
public void onAccept(final Transport transport) {
try {
getDefaultTaskRunnerFactory().execute(new Runnable() {
@ -236,8 +236,8 @@ public class TransportConnector implements Connector, BrokerServiceAware {
LOG.debug("Reason: " + error, error);
}
});
server.setBrokerInfo(brokerInfo);
server.start();
getServer().setBrokerInfo(brokerInfo);
getServer().start();
DiscoveryAgent da = getDiscoveryAgent();
if (da != null) {