Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 78667 invoked from network); 24 Oct 2009 03:35:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Oct 2009 03:35:41 -0000 Received: (qmail 71496 invoked by uid 500); 24 Oct 2009 03:35:40 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 71361 invoked by uid 500); 24 Oct 2009 03:35:40 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 71348 invoked by uid 99); 24 Oct 2009 03:35:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2009 03:35:40 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bruce.snyder@gmail.com designates 209.85.218.215 as permitted sender) Received: from [209.85.218.215] (HELO mail-bw0-f215.google.com) (209.85.218.215) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2009 03:35:29 +0000 Received: by bwz7 with SMTP id 7so1441928bwz.6 for ; Fri, 23 Oct 2009 20:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=4Kld9mvKt0SP2gSQ3aC2Q19kO4aEsHuu0Zf5pzjIHQ0=; b=CinguSB1f03KIV0GxtfMaqmvGhrwfSal4mpGdRMr1i+2d1X+n6J/9KF6AkgkuzJfOj tOK/lH7RggPcHJ1aNU87cbuvzXdD5M3O21/XVgyJIAtfyyXLOjCmEF5XssUcayRbpj3Y iQM8SEGP3/SzRy4DSm4q1DN/w+wSLq5ilz9k0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=HW6nhTxfoLQeCj7ZRHGj9ULAetX2nVfP34Zu1Ll1SV1WjFey0vNFjXpMqPQmv3Yynl ll4x1zJ8qkaMN9o0YBqvAoLVIg94fdoQGicFwlDGfw5nj84IWtWJyepP1zz/ozEI1w2A 8UekpHo4nOd0Rwef8dgDZAE3ufhQVy/mPQ8eg= MIME-Version: 1.0 Received: by 10.223.161.205 with SMTP id s13mr447027fax.27.1256355309384; Fri, 23 Oct 2009 20:35:09 -0700 (PDT) In-Reply-To: <26033640.post@talk.nabble.com> References: <26021100.post@talk.nabble.com> <26033640.post@talk.nabble.com> Date: Fri, 23 Oct 2009 21:35:09 -0600 Message-ID: <7b3355cb0910232035y141dbabk38011fad2e4002be@mail.gmail.com> Subject: Re: dynamically create transport connector using Spring From: Bruce Snyder To: users@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Oct 23, 2009 at 3:43 PM, Dan Tran 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