axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Sutter <>
Subject Re: apache shared memory
Date Wed, 03 Dec 2008 12:04:12 GMT
Yes, I make
try to get the variable or create and store and
and then

So I think this is the right way, as every third call confirm.

Kind regards

Manjula Peiris wrote:
> 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:
>>>> For additional commands, e-mail:

View raw message