Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 37074 invoked from network); 30 Jan 2009 16:09:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jan 2009 16:09:28 -0000 Received: (qmail 6259 invoked by uid 500); 30 Jan 2009 16:09:27 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 6025 invoked by uid 500); 30 Jan 2009 16:09:26 -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 6014 invoked by uid 99); 30 Jan 2009 16:09:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Jan 2009 08:09:26 -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; Fri, 30 Jan 2009 16:09:18 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LSvvN-0000ES-MH for users@activemq.apache.org; Fri, 30 Jan 2009 08:08:57 -0800 Message-ID: <21750172.post@talk.nabble.com> Date: Fri, 30 Jan 2009 08:08:57 -0800 (PST) From: Eric-AWL To: users@activemq.apache.org Subject: Re: NamingContext error in 5.2.0 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: eric.vincent@atosorigin.com References: <21749936.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Yes, I will put this workaround. Thank you. James.Strachan wrote: > > Looks like a concurrency bug we should work around. In the mean time - > how about adding a synchronized block around looking up a queue in > JNDI? You should only need to look it up once on start up and not need > to look it up in each thread many times concurrently? > > 2009/1/30 Eric-AWL : >> >> Hi >> >> On 5.2.0 release. >> >> I create 10 threads, each using the same dynamicQueues/CATE-CHARGE-charge >> queue >> >> I fail with >> >> javax.naming.NamingException: Something already bound at >> CATE-CHARGE-Charge >> at >> org.apache.activemq.jndi.ReadOnlyContext.internalBind(ReadOnlyContext.java:150) >> at >> org.apache.activemq.jndi.LazyCreateContext.lookup(LazyCreateContext.java:36) >> at >> org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:258) >> at >> org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:228) >> at javax.naming.InitialContext.lookup(InitialContext.java:351) >> at >> atosbus.transport.jms.CJMSSenderChannel.(CJMSSenderChannel.java:97) >> at >> atosbus.transport.jms.CJMSTransport.createSenderChannel(CJMSTransport.java:216) >> at >> atosbus.core.service.CSynchronousContext.sendRequestCMessage(CSynchronousContext.java:559) >> at >> atosbus.mep.CMepUnsafeInOnly.cltSendCommand(CMepUnsafeInOnly.java:191) >> at >> atosbus.core.service.CSynchronousContext.sendCommand(CSynchronousContext.java:806) >> at >> atosbus.core.service.CSynchronousContext.sendCommand(CSynchronousContext.java:731) >> at chargebus.client.ClientThread.run(ClientThread.java:32) >> at java.lang.Thread.run(Thread.java:595) >> >> I think I am in the case where (in LazyCreateContext.lookup) >> super.lookup(name) sent the NameNotFoundException, but, when internalBind >> was called, the queue was just binded by an other thread. >> >> >> -- >> View this message in context: >> http://www.nabble.com/NamingContext-error-in-5.2.0-tp21749936p21749936.html >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > > -- > James > ------- > http://macstrac.blogspot.com/ > > Open Source Integration > http://fusesource.com/ > > -- View this message in context: http://www.nabble.com/NamingContext-error-in-5.2.0-tp21749936p21750172.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.