Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 74748 invoked from network); 29 May 2009 02:55:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 May 2009 02:55:15 -0000 Received: (qmail 67942 invoked by uid 500); 29 May 2009 02:55:28 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 67897 invoked by uid 500); 29 May 2009 02:55:28 -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 67887 invoked by uid 99); 29 May 2009 02:55:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 May 2009 02:55:27 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of wsobjack@gmail.com designates 72.14.220.156 as permitted sender) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 May 2009 02:55:18 +0000 Received: by fg-out-1718.google.com with SMTP id e12so1422461fga.12 for ; Thu, 28 May 2009 19:54:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=it8CBW5h0HwQpOAZe9UrwT9Gv2IcgUbWJ3frOFBhhOE=; b=epQj7WpgJarHEyyzxP+U8+eHtTJLfDHAtG4XG3Pw0hSsfysCdEMaxfW+rVgMkAtG9e g7gL8E5xMeGWj/cHMdELvnWZJYVKMtT3F7Sdy3ObBLBHrqBNtFHV5uM3UvIXn5r0av0X poKdKtogjtJR2EFklCrdu73OR/toC5IL6Ta3I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=G3s12CI515rT0lDtSZCvJUa1GfefN0HRQtI5gDZ4dgoILlZyhdJ3cXJWmLsArBbKEw azQuc+zRf6s+HomCKugJYoznVFFMqhlixANzx48GghbkY5HMxnKWG9Vy9rOAlKbqrH2s 0Jg+hJtEeCxZhFlX6n5qPl0asurxDIectBoGo= MIME-Version: 1.0 Received: by 10.239.179.200 with SMTP id e8mr148754hbg.122.1243565697841; Thu, 28 May 2009 19:54:57 -0700 (PDT) In-Reply-To: <99e30fe50905280832x5ec0e3a0pa686ccf6cdcb3d0b@mail.gmail.com> References: <1242163189.2302.15.camel@localhost.localdomain> <99e30fe50905220701n78d126b6s344b84e1f78a45f7@mail.gmail.com> <99e30fe50905280832x5ec0e3a0pa686ccf6cdcb3d0b@mail.gmail.com> Date: Thu, 28 May 2009 21:54:57 -0500 Message-ID: Subject: Re: java qpid session issues From: Walter Sobjak To: users@qpid.apache.org Content-Type: multipart/alternative; boundary=001485f2bf5eacba77046b043304 X-Virus-Checked: Checked by ClamAV on apache.org --001485f2bf5eacba77046b043304 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Oops. Yes, the QPID java client against the QPID CPP broker handles this. On Thu, May 28, 2009 at 10:32 AM, Martin Ritchie wrote: > 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 > > --001485f2bf5eacba77046b043304--