Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 37928 invoked from network); 25 Aug 2010 01:27:00 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Aug 2010 01:27:00 -0000 Received: (qmail 3590 invoked by uid 500); 25 Aug 2010 01:27:00 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 3517 invoked by uid 500); 25 Aug 2010 01:26:59 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 3509 invoked by uid 99); 25 Aug 2010 01:26:59 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Aug 2010 01:26:59 +0000 X-ASF-Spam-Status: No, hits=4.2 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,SPF_HELO_PASS,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.158 is neither permitted nor denied by domain of zhaoyi0113@gmail.com) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Aug 2010 01:26:37 +0000 Received: from jim.nabble.com ([192.168.236.80]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Oo4kq-0007qX-Jy for users@qpid.apache.org; Tue, 24 Aug 2010 18:26:16 -0700 Date: Tue, 24 Aug 2010 18:26:16 -0700 (PDT) From: "zhaoyi0113@gmail.com" To: users@qpid.apache.org Message-ID: <1282699576596-5459422.post@n2.nabble.com> Subject: How can I declare a queue on JMS api? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I want to declare a queue by Java JMS api. I write a JNDI property file and I am not sure which code below is declaring the queue. context = new InitialContext(getProperties()); ConnectionFactory conFac = (ConnectionFactory) context .lookup(address.getConnectionFactory()); connection = conFac.createConnection(); Destination destination = (Destination) context.lookup(address .getQueueName()); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageConsumer messageConsumer = session .createConsumer(destination); messageConsumer.setMessageListener(endpoint); connection.start(); -- View this message in context: http://apache-qpid-users.2158936.n2.nabble.com/How-can-I-declare-a-queue-on-JMS-api-tp5459422p5459422.html Sent from the Apache Qpid users mailing list archive at Nabble.com. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org