Return-Path: Delivered-To: apmail-ws-axis-c-user-archive@www.apache.org Received: (qmail 13971 invoked from network); 3 Dec 2008 11:48:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Dec 2008 11:48:14 -0000 Received: (qmail 26563 invoked by uid 500); 3 Dec 2008 11:48:24 -0000 Delivered-To: apmail-ws-axis-c-user-archive@ws.apache.org Received: (qmail 26545 invoked by uid 500); 3 Dec 2008 11:48:23 -0000 Mailing-List: contact axis-c-user-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C User List" Reply-To: "Apache AXIS C User List" Delivered-To: mailing list axis-c-user@ws.apache.org Received: (qmail 26534 invoked by uid 99); 3 Dec 2008 11:48:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Dec 2008 03:48:23 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.68.5.15] (HELO relay01.pair.com) (209.68.5.15) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 03 Dec 2008 11:46:53 +0000 Received: (qmail 28749 invoked from network); 3 Dec 2008 11:46:39 -0000 Received: from 123.231.64.242 (HELO ?10.100.1.184?) (123.231.64.242) by relay01.pair.com with SMTP; 3 Dec 2008 11:46:39 -0000 X-pair-Authenticated: 123.231.64.242 Subject: Re: apache shared memory From: Manjula Peiris To: Michael.Sutter@ipe.fzk.de Cc: Apache AXIS C User List In-Reply-To: <49363E3E.9010005@ipe.fzk.de> References: <493513BF.5050203@ipe.fzk.de> <1228239977.6758.5.camel@manjula> <49363E3E.9010005@ipe.fzk.de> Content-Type: text/plain Date: Wed, 03 Dec 2008 17:16:56 +0530 Message-Id: <1228304816.8733.2.camel@manjula> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org In your code are you switching to global pool before accessing the shared variable? Honestly speaking I have no time to look at your code. Thanks -Manjula. On Wed, 2008-12-03 at 09:07 +0100, Michael Sutter wrote: > Hello, > > I already have enabled the Axis2GlobalPoolSize parameter and I have > implemented > the service. The problem is, that the service works only every third > call and I think this > is a very strange behavior and I don't see what I have done wrong. > Maybe I have a small > error, but why it works with the simple server? > > Kind regards > Michael > > Manjula Peiris wrote: > > You can enable Shared memory for mod_axis2 by adding Axis2GlobalPoolSize > > parameter in the httpd.conf. And when accessing that shared variable you > > need to switch to global pool. Please see axutil_allocator.h for > > details. > > > > > > On Tue, 2008-12-02 at 11:53 +0100, Michael Sutter wrote: > > > > > Hello list, > > > > > > I have a strange behavior and hopefully someone can help me. I have > > > implemented a simple service and I want > > > to access the shared memory of the apache daemon. The service stores a > > > object, which can perform some basic > > > mathematical operations and store a value. > > > > > > In the first call of the service the shared variable is initialized and > > > stored with a value in the shared > > > memory. Every following call should get the shared variable, add two > > > numbers and store it in the shared variable > > > (setLaenge(int a) in myadd.cpp). The result should look like this: first > > > call 10, second call 19, third call 28 and so on, > > > increasing with nine for every following call. > > > > > > The problem know is that I only get the correct value from the service > > > every third call, but then the right value. For the > > > other calls I always got the same, invalid value. It looks like first > > > call 10, second call -1211088511, third call -1211088511, > > > fourth call 19 and so on. I tested it on two servers with an older and > > > newer apache, having the same behavior, but other > > > incorrect values. If I test the service with the axis simple server > > > everything works fine, but I don't know if I can test the > > > shared memory with the simple server? > > > > > > My question now is: Does anybody knew this behavior? Maybe I have > > > implemented something wrong and attached > > > the service. It would be very nice, if someone can have a look inside my > > > code. > > > > > > Kind regards > > > Michael > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org > > > For additional commands, e-mail: axis-c-user-help@ws.apache.org > > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-user-help@ws.apache.org