On Fri, Oct 23, 2009 at 3:43 PM, Dan Tran <dant...@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)u8...@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

Reply via email to