Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 84713 invoked from network); 28 May 2009 15:33:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 May 2009 15:33:22 -0000 Received: (qmail 75077 invoked by uid 500); 28 May 2009 15:33:34 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 75052 invoked by uid 500); 28 May 2009 15:33:34 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 75042 invoked by uid 99); 28 May 2009 15:33:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 15:33:34 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of martin.a.ritchie@googlemail.com designates 209.85.218.159 as permitted sender) Received: from [209.85.218.159] (HELO mail-bw0-f159.google.com) (209.85.218.159) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 15:33:25 +0000 Received: by bwz3 with SMTP id 3so5517738bwz.33 for ; Thu, 28 May 2009 08:33:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=4ohvN1FIn6BHk8Ecw/GOrrwwG793KIiAWUhTPjH/aNU=; b=benJ5cXEihj43ylrIK7r733tPCwkIhIZUqOyd7E1aKCX0kDdU9uV5LSFx6OTULWBVG fhP8N1brsjvTPXGTo8WU9qm+7IhHOtY81wyyEc3lVVuYProVjGqvDUE8rlYCVE0vWbyO gYdIMTZl9nJ9OhhfFMC0dVBCKqJduElh9QCIM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=PXJM0ePVVj5TKGCVTS31/7uyZnHGIGrAb0PGZsfhK6e7MWYXoGGmWLQnod/Ppnn6e2 K6IEBNLi/nNgtE4W82K05DRwPA7YwIOZlkdByiwzgNacBRVOwK7FIC4zT4Nkm63XODhl SbClAwYaZN6wZheAXb8AAX9cJrwEb1GjwSkhE= MIME-Version: 1.0 Sender: martin.a.ritchie@googlemail.com Received: by 10.223.111.134 with SMTP id s6mr1210853fap.60.1243524783129; Thu, 28 May 2009 08:33:03 -0700 (PDT) In-Reply-To: References: <1242163189.2302.15.camel@localhost.localdomain> <99e30fe50905220701n78d126b6s344b84e1f78a45f7@mail.gmail.com> Date: Thu, 28 May 2009 16:32:44 +0100 X-Google-Sender-Auth: 3c2f7cd064de545a Message-ID: <99e30fe50905280832x5ec0e3a0pa686ccf6cdcb3d0b@mail.gmail.com> Subject: Re: java qpid session issues From: Martin Ritchie To: users@qpid.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 2009/5/28 Walter Sobjak : > Thanks for the reply. > Ah, I did not know that was not JMS compliant; that being said, this test > case works against every JMS implementation I've tried it against. When I > fix the ordering, it works as expected. I do recall the Java client auto starting the connection on the first call to receive() but I think we took that out as it was not strictly JMS compliant. I'll try and find some time to see what your test case is doing and why it doesn't work as you expected. > This was with the QPID Java Client with the QPID Java Broker. The QPID CPP > client appears to handle this. This is with Sun's Java6 implementation on > Fedora9. I believe I also tried this with Sun's Java5 and JRockit's Java5. When you say the 'CPP client' do you mean the Java client to the cpp broker? Cheers Martin > > On Fri, May 22, 2009 at 9:01 AM, Martin Ritchie wrote: > >> 2009/5/13 Walter Sobjak : >> > Hello >> > >> > I believe I may have uncovered a possible concurrency issue with the way >> > the Java Broker and/or Client works. It appears if a message consumer >> > is awaiting a message in receive() before its connection is started, it >> > is never able to pull from its queue. >> > >> > I have attached a sample bit of code that hopefully displays this. In >> > it, I create a temp queue and consumer from a session. Then I create a >> > sub-thread that creates a producer, sends a message, then tries to >> > manually have the consumer pull from that queue using cons.receive(). >> > >> > I start the thread, sleep for 2s, and then start the connection. The >> > consumer hangs while trying to receive the message. According to JMX, >> > the temp queue I create has both a consumer and a message before I start >> > the sub-thread. >> > >> > This is against the M4 versions of the Java Broker and client; I have >> > also tried the first 0.5 release candidate. >> > >> > Thanks >> > >> > WS >> > >> > >> > >> > --------------------------------------------------------------------- >> > Apache Qpid - AMQP Messaging Implementation >> > Project: http://qpid.apache.org >> > Use/Interact: mailto:users-subscribe@qpid.apache.org >> > >> >> I shall try and find some time to run your test case however what you >> are doing is not JMS compliant. >> >> You should start the connection BEFORE attempting to call receive(). >> >> That said I'll need to run your test app to see what is gong on as I >> would have thought that starting afterwards should work. >> >> Were you using the matching Java broker in your test? Not that it >> should matter but just so that I can reproduce more accurately what >> you are doing. >> >> Also just in case it matters what JVM and OS are you using? >> >> Cheers >> >> Martin >> >> >> >> -- >> Martin Ritchie >> >> --------------------------------------------------------------------- >> Apache Qpid - AMQP Messaging Implementation >> Project: http://qpid.apache.org >> Use/Interact: mailto:users-subscribe@qpid.apache.org >> >> > -- Martin Ritchie --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org