Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 12825 invoked from network); 12 Mar 2008 21:49:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Mar 2008 21:49:08 -0000 Received: (qmail 32863 invoked by uid 500); 12 Mar 2008 21:49:04 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 32674 invoked by uid 500); 12 Mar 2008 21:49:04 -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 32664 invoked by uid 99); 12 Mar 2008 21:49:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Mar 2008 14:49:04 -0700 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 (nike.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; Wed, 12 Mar 2008 21:48:15 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JZYoN-0001Ek-D8 for users@activemq.apache.org; Wed, 12 Mar 2008 14:48:35 -0700 Message-ID: <16012630.post@talk.nabble.com> Date: Wed, 12 Mar 2008 14:48:35 -0700 (PDT) From: pjagwani To: users@activemq.apache.org Subject: Re: Looking for Sample Code JMS 1.02b In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: prakash.jagwani@sungard.com References: <15976698.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Here's what I did to get my sample to work. I put the apache-activemq-4.1.1.jar in front of the Weblogic 8.1 jar and it seemed to work fine. For my sample app I used http://java.sun.com/products/jms/tutorial/1_3_1-fcs/examples/simple/SimpleQueueSender.java & http://java.sun.com/products/jms/tutorial/1_3_1-fcs/examples/simple/SimpleQueueReceiver.java I had to make the following modification to the code. 1) Set queue name to "dynamicQueues/SIMPLE.QUEUE" 2) To create the InitialContext using rather than jndiContext = new InitialContext(); I used the following code. Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.activemq.jndi.ActiveMQInitialContextFactory"); env.put(Context.PROVIDER_URL, "tcp://localhost:61616"); jndiContext= new InitialContext(env); 3) To Lookup the ConnectionFactory rather than queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup("QueueConnectionFactory"); I used the following.. queueConnectionFactory = (QueueConnectionFactory)jndiContext.lookup("ConnectionFactory"); Thanks! James.Strachan wrote: > > On 11/03/2008, pjagwani wrote: >> >> Hi. >> >> Current configuration is Weblogic 8.1, JDK 1.4.2, ActiveMQ 5. >> >> Looking for code to connect to Active MQ using JMS 1.02b. > > ActiveMQ supports JMS 1.1 so you'll need to add the jms 1.1 jars to > the system/boot classpath. > > ActiveMQ 5.x is based on Java 5, though you can install the > retrotranslator JIT to work nicely on Java 1.4.x JVMs... > http://retrotranslator.sourceforge.net/#jit > >> I would also be >> interested in connecting to ActiveMQ using the ActiveMQ api. > > That'll be JMS :) > > > -- > James > ------- > http://macstrac.blogspot.com/ > > Open Source Integration > http://open.iona.com > > -- View this message in context: http://www.nabble.com/Looking-for-Sample-Code-JMS-1.02b-tp15976698s2354p16012630.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.