Evan Klinger wrote:
Damintha,
Thank you for your reply. Does this mean I need to use the set of
apr_* mutex functions or will the standard pthread functions be
sufficient? Do you know of any examples that make use of mutexes?
Axis2/C has implemented a wrapper layer for handling platform specific thread impls. In linux this wraps pthreads. You just create Axis2/C thread mutex and use it's functions. For example see how it is used in util/src/log.c

Thanks,
Damitha
Thanks
Evan

On Tue, May 11, 2010 at 9:54 PM, Damitha Kumarage <dami...@wso2.com> wrote:
Evan Klinger wrote:
Hello,
When developing a REST service in Axis2/C, how does Apache handle the
integration with the Axis2 module? When a request comes in that is
passed to the Axis2 module, does each request create a new instance of
the service or is it a new thread?
It is a new thread
 Basically, in the service we may
need to open a file for writing but also for reading, depending upon
the request. However, we don't want to read while the file is being
written to so it seems like we need a rw lock/mutex, but that will
only work if the service is called by multiple threads. If they are
called from separate processes then I don't think this approach will
work. Any information on how to handle this would be greatly
appreciated.

For each Apache process there will be a separate Axis2/C engine/service.
Within that process
a single service would handle all requests coming for that service. So you
need to handle mt.
Thanks,
Damitha
Thank you
Evan

---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscr...@axis.apache.org
For additional commands, e-mail: c-user-h...@axis.apache.org



--
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscr...@axis.apache.org
For additional commands, e-mail: c-user-h...@axis.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscr...@axis.apache.org
For additional commands, e-mail: c-user-h...@axis.apache.org




--
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: c-user-unsubscr...@axis.apache.org
For additional commands, e-mail: c-user-h...@axis.apache.org

Reply via email to