Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 19947 invoked from network); 28 Jul 2006 12:12:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jul 2006 12:12:40 -0000 Received: (qmail 50549 invoked by uid 500); 28 Jul 2006 12:12:40 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 50368 invoked by uid 500); 28 Jul 2006 12:12:39 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 50359 invoked by uid 99); 28 Jul 2006 12:12:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2006 05:12:39 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of james.strachan@gmail.com designates 66.249.92.172 as permitted sender) Received: from [66.249.92.172] (HELO ug-out-1314.google.com) (66.249.92.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2006 05:12:36 -0700 Received: by ug-out-1314.google.com with SMTP id m2so772460uge for ; Fri, 28 Jul 2006 05:12:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UAGz10y1kd7o6NL4HYStouviXjD+mTAorbbKpyqvyEPoffVJ59zGaK3BYteV2sCMhjtRQpQ36T/B9PbrAT8xkbmcP+XucKFMd95Kqdv3BMNLYPgLOTOoBVniYpGeJPc34ZPuh6PcYQ5QRzVJLHXWOaZQcDklN6mjJCJYoqEEFz0= Received: by 10.78.142.14 with SMTP id p14mr51274hud; Fri, 28 Jul 2006 05:12:15 -0700 (PDT) Received: by 10.78.174.8 with HTTP; Fri, 28 Jul 2006 05:12:15 -0700 (PDT) Message-ID: Date: Fri, 28 Jul 2006 13:12:15 +0100 From: "James Strachan" To: activemq-users@geronimo.apache.org Subject: Re: broker static dynamic IP list In-Reply-To: <5538264.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5519815.post@talk.nabble.com> <5536541.post@talk.nabble.com> <5537215.post@talk.nabble.com> <5538074.post@talk.nabble.com> <5538264.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Does the JVM start up any other JMS connections using "vm://" before you start the broker? On 7/28/06, Venkatg wrote: > > > public class BrokerMain > { > public static void main(String[] args) > { > final BrokerService broker = new BrokerService();; > Runnable doRun = new Runnable(){ > public void run() > { > try > { > > broker.setBrokerName("FE-Test"); > broker.addConnector(new URI("tcp://localhost:61616")); > thrdBroker.setBrokerName("BEServer"); > thrdBroker.setPersistent(false); > thrdBroker.setUseJmx(false); > thrdBroker.start(); > } catch (Exception e) > { > e.printStackTrace(); > } > } > }; > Thread thrd = new Thread(doRun); > thrd.start(); > ProducerTool publisher = new ProducerTool(); > while( !broker.isStarted() ); > > BufferedReader waiter = new BufferedReader(new > InputStreamReader(System.in)); > String input = null; > try > { > System.out.println("Following Commands are supported"); > System.out.println("Publish Messages => 1"); > System.out.println("Add N/W Connector => 2"); > System.out.println("Stop Broker => 3"); > int opCode = -1; > boolean isStopped = false; > while( !isStopped && ( input = waiter.readLine()) != null ) > { > opCode = Integer.parseInt(input); > switch( opCode ) > { > case 1: > { > ProducerTool.runTool( args, publisher); > } > break; > case 2: > { > System.out.println("Enter Broker IPAddress and > Port (Ex:10.10.8.212:6333) :"); > String ipAddress = waiter.readLine(); > if( ipAddress != null && ipAddress.length() > 0 > ) > { > > broker.addNetworkConnector("static:(tcp://"+ipAddress+")"); > } > } > break; > case 3: > { > isStopped = true; > } > break; > default: > } > > } > } catch (IOException e) > { > e.printStackTrace(); > } catch (Exception e) > { > e.printStackTrace(); > } finally > { > try > { > broker.stop(); > } catch (Exception e) > { > e.printStackTrace(); > } > } > } > > Thanks > Venkat > -- > View this message in context: http://www.nabble.com/broker-static-dynamic-IP-list-tf2009183.html#a5538264 > Sent from the ActiveMQ - User forum at Nabble.com. > > -- James ------- http://radio.weblogs.com/0112098/