activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam2222 <sam...@net-liard.com>
Subject Re: Discovery without multicast (like on EC2)
Date Mon, 18 Jul 2011 21:53:01 GMT
Thx I find it.

I need to change org.apache.activemq.broker.TransportConnector :
protected DiscoveryAgent createDiscoveryAgent() throws IOException {
  if (discoveryUri != null) {
    DiscoveryAgent agent =
DiscoveryAgentFactory.createDiscoveryAgent(discoveryUri);
    if( agent!=null && agent instanceof BrokerServiceAware ) {
      ((BrokerServiceAware)agent).setBrokerService(brokerService);
    }
    return agent;
  }
  return null;
}

But Spring context is always null.
I find the solution : add brokerContext="#springContext" in broker tag.
But if org.apache.activemq.xbean.XBeanBrokerService implement
org.springframework.context.ApplicationContextAware it's can be easier :).
I try and it's work.

Maybe you can add these two modifications on next version.

Samuel

--
View this message in context: http://activemq.2283324.n4.nabble.com/Discovery-without-multicast-like-on-EC2-tp3658967p3676610.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Mime
View raw message