Return-Path: Delivered-To: apmail-geronimo-activemq-dev-archive@www.apache.org Received: (qmail 29091 invoked from network); 4 Jul 2006 15:52:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Jul 2006 15:52:06 -0000 Received: (qmail 36022 invoked by uid 500); 4 Jul 2006 15:52:04 -0000 Delivered-To: apmail-geronimo-activemq-dev-archive@geronimo.apache.org Received: (qmail 35962 invoked by uid 500); 4 Jul 2006 15:52:04 -0000 Mailing-List: contact activemq-dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-dev@geronimo.apache.org Received: (qmail 35855 invoked by uid 99); 4 Jul 2006 15:52:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jul 2006 08:52:03 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of chirino@gmail.com designates 66.249.92.175 as permitted sender) Received: from [66.249.92.175] (HELO ug-out-1314.google.com) (66.249.92.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jul 2006 08:52:01 -0700 Received: by ug-out-1314.google.com with SMTP id m3so1999789uge for ; Tue, 04 Jul 2006 08:51:40 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=X5AGCVSZTty2xw0qzSgjxFFfIpf2e7ATQRy0U/lZFaQteKe7+AlWmEdvijEqXSdNF+b/pOiAmYyzI51c06zo41kswtMH9HkYEZxmb2LH2yzWGJFxtXeyiVWHkwlIl3hCLYpUvomn1cWUjn4gxeW/VJARTWMmo9ZoRzJrgU7oHkY= Received: by 10.66.243.2 with SMTP id q2mr6742398ugh; Tue, 04 Jul 2006 08:51:39 -0700 (PDT) Received: by 10.66.243.7 with HTTP; Tue, 4 Jul 2006 08:51:21 -0700 (PDT) Message-ID: Date: Tue, 4 Jul 2006 11:51:21 -0400 From: "Hiram Chirino" Sender: chirino@gmail.com To: activemq-dev@geronimo.apache.org Subject: Re: In-Reply-To: <005401c69f72$76980440$2802a8c0@Workstation> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_28251_3346297.1152028281264" References: <005401c69f72$76980440$2802a8c0@Workstation> X-Google-Sender-Auth: f35903cdb2e366e5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_28251_3346297.1152028281264 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks guys.. the patch is now applied. On 7/4/06, Timothy Bish wrote: > > I took a look at the patch, it looks like it should work without impacting > anything. > > ------------------------------------------------- > Timothy A. Bish > tabish@twcny.rr.com > > > -----Original Message----- > From: chirino@gmail.com [mailto:chirino@gmail.com] On Behalf Of Hiram > Chirino > Sent: Tuesday, July 04, 2006 9:26 AM > To: activemq-dev@geronimo.apache.org > Subject: Re: > > It should be on it's way to your gmail account. > > On 7/4/06, Nathan Mittler wrote: > > > > Hey Hiram, > > Looks ok at first glance - could you send me the patch file as an > > attachment? I seem to be having problems applying the patch through > copy > > & > > paste into subclipse. > > > > Thanks, > > Nate > > > > On 7/3/06, Hiram Chirino wrote: > > > > > > Hi Nathan, > > > > > > Please review the following patch. It allows the stomp client to > accept > > a > > > variable amount of while space between frames. I ran the integration > > > tests > > > a slightly modified amq broker where it used 3 \n between frames and > > also > > > one where no \n were used between frames. Everything seemed to work, > > but > > > since c++ is not my forte, I'm looking for a +1 from a before I commit > > the > > > change. > > > > > > Index: src/main/activemq/connector/stomp/StompCommandReader.cpp > > > =================================================================== > > > --- > > src/main/activemq/connector/stomp/StompCommandReader.cpp (revision > > > 418889) > > > +++ > src/main/activemq/connector/stomp/StompCommandReader.cpp (working > > > copy) > > > @@ -70,20 +70,46 @@ > > > void StompCommandReader::readStompCommand( StompFrame& frame ) > > > throw ( StompConnectorException ) > > > { > > > - // Read the command; > > > - int numChars = readStompHeaderLine(); > > > + while( true ) > > > + { > > > + // Clean up the mess. > > > + buffer.clear(); > > > > > > - if( numChars <= 0 ) > > > - { > > > - throw StompConnectorException( > > > - __FILE__, __LINE__, > > > - "StompCommandReader::readStompCommand: " > > > - "Error on Read of Command Header" ); > > > - } > > > + // Read the command; > > > + readStompHeaderLine(); > > > > > > - // Set the command in the frame - copy the memory. > > > - frame.setCommand( reinterpret_cast(&buffer[0]) ); > > > - > > > + // Ignore all white space before the command. > > > + int offset=-1; > > > + for( size_t ix = 0; ix < buffer.size()-1; ++ix ) > > > + { > > > + // Find the first non space character > > > + char b = buffer[ix]; > > > + switch ( b ) > > > + { > > > + case '\n': > > > + case '\t': > > > + case '\r': > > > + break; > > > + > > > + default: > > > + offset = ix; > > > + break; > > > + } > > > + > > > + if( offset != -1 ) > > > + { > > > + break; > > > + } > > > + } > > > + > > > + if( offset >= 0 ) > > > + { > > > + // Set the command in the frame - copy the memory. > > > + frame.setCommand( > > > reinterpret_cast(&buffer[offset]) ); > > > + break; > > > + } > > > + > > > + } > > > // Clean up the mess. > > > buffer.clear(); > > > } > > > @@ -224,8 +250,7 @@ > > > read( &buffer[0], content_length ); > > > > > > // Content Length read, now pop the end terminator off > (\0\n). > > > - if(inputStream->read() != '\0' || > > > - inputStream->read() != '\n') > > > + if(inputStream->read() != '\0' ) > > > { > > > throw StompConnectorException( > > > __FILE__, __LINE__, > > > @@ -251,16 +276,6 @@ > > > continue; > > > } > > > > > > - // We read up to the first NULL, now lets pop off the > > > required > > > - // newline to complete the packet. > > > - if(inputStream->read() != '\n') > > > - { > > > - throw StompConnectorException( > > > - __FILE__, __LINE__, > > > - "StompCommandReader::readStompBody: " > > > - "Read Body, and no trailing newline"); > > > - } > > > - > > > break; // Read null and newline we are done. > > > } > > > } > > > > > > > > > > > > On 7/3/06, Nathan Mittler < nathan.mittler@gmail.com> wrote: > > > > > > > > No problem - sorry for the confusion :) > > > > > > > > On 7/3/06, Hiram Chirino wrote: > > > > > > > > > > Oh. That makes sense! Sorry for the noise! > > > > > > > > > > On 7/3/06, Mittler, Nathan wrote: > > > > > > > > > > > > Hey Hiram, > > > > > > I was actually thinking of the messages coming from the broker > to > > > the > > > > > > client - the newer version of the broker always sends a \0\n to > > > denote > > > > > > the end of the frame. I'm not sure if the CMS client is sly > > enough > > > to > > > > > > handle both cases - I think it's expecting one or the other > > (either > > > \0 > > > > > > or \0\n). I was just throwing that out there as a possible > reason > > > > that > > > > > > the client may freeze on a read - waiting for the trailing \n > that > > > > never > > > > > > comes. > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: chirino@gmail.com [mailto: chirino@gmail.com] On Behalf > > > > > > > Of Hiram Chirino > > > > > > > Sent: Monday, July 03, 2006 12:58 PM > > > > > > > To: activemq-dev@geronimo.apache.org > > > > > > > Subject: Re: > > > > > > > > > > > > > > Hi Nathan, > > > > > > > > > > > > > > I'm not so sure about that. I think that AMQ should support > > > > > > > receiving a STOMP frame terminated by \0 without a subsequent > > > > > > > \n. The STOMP spec does say that white space before a frame > > > > > > > should be ignored. Anyways, if anybody can confirm that this > > > > > > > is not the case, then it's a bug with how we implemented STOMP > > in > > > > AMQ. > > > > > > > > > > > > > > On 7/3/06, Mittler, Nathan wrote: > > > > > > > > > > > > > > > > Hi Naveen, > > > > > > > > There are a couple of things that might be causing this. > > > > > > > > > > > > > > > > 1) The stomp frame ending characters have changed in recent > > > > > > > versions > > > > > > > > of AMQ. AMQ now enforces that stomp frames end with \0\n > > > > > > > for all commands. > > > > > > > > If you have an older version of CMS, and a fairly new > > > > > > > version of AMQ > > > > > > > > (e.g. 4.0), they may not play nice together. > > > > > > > > > > > > > > > > 2) I have seen some deadlocking occur on compilers that > > > > > > > don't support > > > > > > > > the PTHREAD_MUTEX_RECURSIVE type for mutexes (the code > checks > > > > > > > > __USE_UNIX98 and __APPLE__ flags to make this > > > determination. CMS > > > > > > > > requires recursive mutexes to work properly - it will > deadlock > > > > > > > > otherwise. > > > > > > > > > > > > > > > > Regardless of what your particular problem is, I recommend > > > > > > > downloading > > > > > > > > and trying out the activemq-cpp code > > > > > > > > > > > > > > > ( > > > > > https://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-cp > > > > > > > > p/ ). It solves the mutex problem (since it doesn't use > > > recursive > > > > > > > > mutexes) and has been tested against AMQ 4.0.1 (it actually > > > > > > > requires > > > > > > > > 4.0.1 or greater). > > > > > > > > > > > > > > > > Give that a try and let me know how it goes. > > > > > > > > > > > > > > > > Regards, > > > > > > > > Nate > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > > From: Naveen Rawat [mailto: naveen@in.effectsoft.com] > > > > > > > > > Sent: Saturday, July 01, 2006 9:15 AM > > > > > > > > > To: activemq-dev@geronimo.apache.org; > > > user@activemq.codehaus.org > > > > > > > > > Subject: > > > > > > > > > > > > > > > > > > Hi there..!! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I was trying out CMS OPENWIRE C++ APIs on SUSE Linux 10.0 > > > (Kernel > > > > > > > > > release > > > > > > > > > 2.6.13-15.8-default) > > > > > > > > > Whenever I try to execute TestMain.cpp it gives the > > following > > > > and > > > > > > > > > goes into sleep mode. > > > > > > > > > > > > > > > > > > > > > > > > > > > Connecting to ActiveMQ broker... > > > > > > > > > Opening socket to: 127.0.0.1 on port 61666 Sending > command: > > > > > > > > > cmd.id = 1, corr.id = -1, type = CONNECTION_INFO Received > > > > > > > > > command: cmd.id = 0, corr.id = -1, type = > > > > > > > WIRE_FORMAT_INFO Received > > > > > > > > > command: cmd.id = 1, corr.id = -1, type = BROKER_INFO > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > My AMQ Server is running as : > > > > > > > > > > > > > > > > > > ACTIVEMQ_HOME: /home/nrawat/incubator- activemq-4.0 > > > > > > > > > Loading message broker from: xbean:activemq.xml Created > > > > > > > MBeanServer > > > > > > > > > with ID: da6bf4:10c2b32b38c:-8000:kuwix:1 > > > > > > > > > INFO BrokerService - ActiveMQ 4.0 JMS > > > > > > > > > Message Broker > > > > > > > > > (localhost) is starting > > > > > > > > > INFO BrokerService - For help or more > > > > > > > > > information please > > > > > > > > > see: http://incubator.apache.org/activemq/ > > > > > > > > > RMIConnectorServer started at: > > > > > > > > > service:jmx:rmi://kuwix/jndi/rmi://localhost:1099/jmxrmi > > > > > > > > > INFO ManagementContext - JMX consoles can > > > connect > > > > to > > > > > > > > > service:jmx:rmi://kuwix/jndi/rmi://localhost:1099/jmxrmi > > > > > > > > > INFO JDBCPersistenceAdapter - Database driver > > > > recognized: > > > > > > > > > [apache_derby_embedded_jdbc_driver] > > > > > > > > > INFO JournalPersistenceAdapter - Journal Recovery > > > > > > > > > Started from: Active > > > > > > > > > Journal: using 5 x 20.0 Megs at: > > > > > > > > > /home/nrawat/incubator-activemq-4.0/activemq-data/journal > > > > > > > > > INFO JournalPersistenceAdapter - Journal Recovered: > 0 > > > > > > > > > message(s) in > > > > > > > > > transactions recovered. > > > > > > > > > INFO TransportServerThreadSupport - Listening for > > > > > > > connections at: > > > > > > > > > tcp://kuwix:61666 > > > > > > > > > WARN MulticastDiscoveryAgent - brokerName not set > > > > > > > > > INFO TransportConnector - Connector default > > > Started > > > > > > > > > INFO TransportServerThreadSupport - Listening for > > > > > > > connections at: > > > > > > > > > tcp://kuwix:61633?wireFormat=stomp > > > > > > > > > INFO TransportConnector - Connector stomp > > Started > > > > > > > > > INFO NetworkConnector - Network Connector > > > > > > > > > default Started > > > > > > > > > INFO BrokerService - ActiveMQ JMS > Message > > > > Broker > > > > > > > > > (localhost, ID:kuwix-2163-1151775977128-1:0) started > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hearty Regards, > > > > > > > > > > > > > > > > > > Naveen Rawat > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > Regards, > > > > > > > Hiram > > > > > > > > > > > > > > Blog: http://hiramchirino.com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Regards, > > > > > Hiram > > > > > > > > > > Blog: http://hiramchirino.com > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Regards, > > > Hiram > > > > > > Blog: http://hiramchirino.com > > > > > > > > > > > > > -- > Regards, > Hiram > > Blog: http://hiramchirino.com > > -- Regards, Hiram Blog: http://hiramchirino.com ------=_Part_28251_3346297.1152028281264--