Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 42420 invoked from network); 28 Mar 2007 10:48:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Mar 2007 10:48:20 -0000 Received: (qmail 34940 invoked by uid 500); 28 Mar 2007 10:48:27 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 34920 invoked by uid 500); 28 Mar 2007 10:48:27 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 34911 invoked by uid 99); 28 Mar 2007 10:48:27 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007 03:48:27 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2007 03:48:19 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1HWVh8-0007Qj-OZ for dev@activemq.apache.org; Wed, 28 Mar 2007 03:47:58 -0700 Message-ID: <9711141.post@talk.nabble.com> Date: Wed, 28 Mar 2007 03:47:58 -0700 (PDT) From: alaa_nobani To: dev@activemq.apache.org Subject: Re: Error in using ActiveMQ with tomcat 5.5 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: alaa_nobani@maktoob.com References: <9678340.post@talk.nabble.com> <9708859.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Thank you very much man for your assistance,It is all working well now and just great, I feel like I was asking a stupid questions but sorry I didnt thought that there is a backward compatibitly issues since this code is from version 3 thank you. James.Strachan wrote: > > Again you're using the old class names from 3.x; in 4.x its in the > command package > > http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/command/ActiveMQTopic.html > > On 3/28/07, alaa_nobani wrote: >> >> Thank you very much it is working now but another exception showed: >> javax.naming.NamingException: org.apache.activemq.message.ActiveMQTopic >> Is It related to the TOPIC I am trying to connect to, I mean that it >> doesnt >> exist, and if so I think it should create it !!! >> >> thanks >> >> >> >> James.Strachan wrote: >> > >> > You're using the wrong package names; ActiveMQ has been in the >> > org.apache.activemq package for a year and a half now >> > >> > On 3/26/07, alaa_nobani wrote: >> >> >> >> Hi, I am new to ActiveMQ and tried to integrate it with tomcat 5.5 so >> I >> >> copied all the necessary JARS to the common/lib directory in tomcat >> then >> >> I >> >> added a META-INF/context.xml to my web application directory >> contaning: >> >> >> >> > >> name="jms/ConnectionFactory" >> >> auth="Container" >> >> type="org.activemq.ActiveMQConnectionFactory" >> >> description="JMS Connection Factory" >> >> factory="org.activemq.jndi.JNDIReferenceFactory" >> >> brokerURL="ssl://localhost:61616" >> >> brokerName="LocalActiveMQBroker" >> >> useEmbeddedBroker="false"/> >> >> >> >> > >> auth="Container" >> >> type="org.activemq.message.ActiveMQTopic" >> >> factory="org.activemq.jndi.JNDIReferenceFactory" >> >> physicalName="MY.TEST.FOO"/> >> >> >> >> >> >> >> >> then I tried to use it in a servlet like this : >> >> >> >> InitialContext initCtx = new InitialContext(); >> >> Context envContext = (Context) initCtx.lookup("java:comp/env"); >> >> ConnectionFactory connectionFactory = (ConnectionFactory) >> >> envContext.lookup("jms/ConnectionFactory"); >> >> Connection connection = connectionFactory.createConnection(); >> >> Session session = connection.createSession(false, >> >> Session.AUTO_ACKNOWLEDGE); >> >> MessageProducer producer = session.createProducer((Destination) >> >> envContext.lookup("jms/topic/MyTopic")); >> >> >> >> Message testMessage = session.createMessage(); >> >> testMessage.setStringProperty("testKey", "testValue"); >> >> producer.send(testMessage); >> >> >> >> >> >> When I request the servlet the following exception comes up: >> >> javax.naming.NamingException: Could not load resource factory class >> [Root >> >> exception is java.lang.ClassNotFoundException: >> >> org.activemq.jndi.JNDIReferenceFactory] >> >> >> >> >> >> So what is wrong and what I should I do else??? >> >> >> >> thanks. >> >> >> >> >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/Error-in-using-ActiveMQ-with-tomcat-5.5-tf3468628s2354.html#a9678340 >> >> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. >> >> >> >> >> > >> > >> > -- >> > >> > James >> > ------- >> > http://radio.weblogs.com/0112098/ >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Error-in-using-ActiveMQ-with-tomcat-5.5-tf3468628s2354.html#a9708859 >> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. >> >> > > > -- > > James > ------- > http://radio.weblogs.com/0112098/ > > -- View this message in context: http://www.nabble.com/Error-in-using-ActiveMQ-with-tomcat-5.5-tf3468628s2354.html#a9711141 Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.