activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruce Snyder <bruce.sny...@gmail.com>
Subject Re: dynamically create transport connector using Spring
Date Sat, 24 Oct 2009 03:35:09 GMT
On Fri, Oct 23, 2009 at 3:43 PM, Dan Tran <dantran@gmail.com> wrote:
>
>
> Actually what I meant was how to dynamically create transportConnector(s) to
> listen to a list of hosts ( ie jms client).
>
> I have looked at ServiceBroker's api, It seems I can do that, but I cannot
> remove the connectors.
>
> Also, would creating many connectors on the fly cause any performance/memory
> issue?
>
> My main purpose is just to control security and what host I can listen to.

Is this what you're seeking?:

BrokerService broker = new BrokerService();
broker.setBrokerName("testBroker");
broker.setPersistent(false);
broker.setUseJmx(true);

TransportConnector transportConnector = new TransportConnector();
transportConnector.setUri(new URI("tcp://localhost:61616"));

broker.addConnector(transportConnector);
broker.start();

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Mime
View raw message