Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 62906 invoked from network); 8 Nov 2007 20:01:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Nov 2007 20:01:10 -0000 Received: (qmail 16540 invoked by uid 500); 8 Nov 2007 20:00:57 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 16508 invoked by uid 500); 8 Nov 2007 20:00:57 -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 16499 invoked by uid 99); 8 Nov 2007 20:00:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2007 12:00:57 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2007 20:00:59 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IqDYM-0002rA-P6 for users@activemq.apache.org; Thu, 08 Nov 2007 12:00:38 -0800 Message-ID: <13654526.post@talk.nabble.com> Date: Thu, 8 Nov 2007 12:00:38 -0800 (PST) From: ttmdev To: users@activemq.apache.org Subject: Re: ActiveMQ JNDI in Tomcat In-Reply-To: <20071108132317.NA2E3.9575.root@fepweb09> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: joe.fernandez@ttmsolutions.com References: <20071108132317.NA2E3.9575.root@fepweb09> X-Virus-Checked: Checked by ClamAV on apache.org You can configure your AMQ administrable objects via the Tomcat JNDI InitialContext implementation. Here's the how-to documentation for Tomcat 6.0. http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html Or w/in your servlet you can create your own InitialContext based on the jndi.properties file in your .../WEB-INF/classes directory; like so. Properties props = new Properties(); props.load(servlet.getServletContext().getResourceAsStream("/WEB-INF/classes/jndi.properties" )); Context jmsCtx = new InitialContext (props); Hope this helps - Joe Dave Carlson wrote: > > Hello, We are trying to connect to an ActiveMQ server from a web app. We > are having trouble with the JNDI part of it. We have not been successful > placing a jndi.properties file in the WEB-INF/classes, nor anywhere else. > The properties in our JNDI file are: > > java.naming.factory.initial > org.apache.activemq.jndi.ActiveMQInitialContextFactory > queue.activity_queue activity_queue > > Regardless, we get a naming exception saying that activity_queue is not > bound in this context. We are trying to get this in the following manner: > > Context context = new javax.naming.InitialContext(); > return context.lookup(str); > > This works outside of the web server, but not in. Can anyone point me in > the right direction? > > -- View this message in context: http://www.nabble.com/ActiveMQ-JNDI-in-Tomcat-tf4772699s2354.html#a13654526 Sent from the ActiveMQ - User mailing list archive at Nabble.com.