Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 83927 invoked from network); 1 Oct 2005 22:07:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Oct 2005 22:07:58 -0000 Received: (qmail 1854 invoked by uid 500); 1 Oct 2005 22:07:56 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 1838 invoked by uid 500); 1 Oct 2005 22:07:56 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Delivered-To: moderator for user@geronimo.apache.org Received: (qmail 98972 invoked by uid 99); 1 Oct 2005 22:03:06 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Message-ID: <433F0780.8090907@luniks.net> Date: Sun, 02 Oct 2005 00:02:40 +0200 From: Torsten User-Agent: Mozilla Thunderbird 1.0 (X11/20041207) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Connect to JMS Queue from Servlet Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, I am trying to connect to a JMS queue from a method that I call from a servlet in a simple webapp. Both the queue and the webapp seems to have been deployed correctly and the webapp works so far, but when trying to look up the ConnectionFactory I get a javax.naming.NameNotFoundException. Below I'll paste my resource adapter XML and the relevant code, could somebody please tell me what I am doing wrong? Thanks in advance, Torsten Context init = new InitialContext(); // Lookup below seems to succeed but... ctx = (Context)init.lookup("java:comp/env"); // but this one fails: NameNotFoundException: jms/ConnectionFactory factory = (QueueConnectionFactory)ctx.lookup("jms/ConnectionFactory"); ActiveMQ RA tcp://localhost:61616 DefaultWorkManager javax.jms.ConnectionFactory jms/ConnectionFactory javax.jms.QueueConnectionFactory javax.jms.TopicConnectionFactory 10 5000 jms/ConnectionFactory javax.jms.Queue org.codehaus.activemq.message.ActiveMQQueue jms/testQueue jms/testQueue