Return-Path: Delivered-To: apmail-axis-c-user-archive@www.apache.org Received: (qmail 53336 invoked from network); 5 Jul 2010 14:04:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Jul 2010 14:04:23 -0000 Received: (qmail 95575 invoked by uid 500); 5 Jul 2010 14:04:23 -0000 Delivered-To: apmail-axis-c-user-archive@axis.apache.org Received: (qmail 95502 invoked by uid 500); 5 Jul 2010 14:04:22 -0000 Mailing-List: contact c-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache AXIS C User List" Delivered-To: mailing list c-user@axis.apache.org Received: (qmail 95494 invoked by uid 99); 5 Jul 2010 14:04:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jul 2010 14:04:22 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of samisa@wso2.com designates 209.85.216.45 as permitted sender) Received: from [209.85.216.45] (HELO mail-qw0-f45.google.com) (209.85.216.45) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jul 2010 14:04:15 +0000 Received: by qwg8 with SMTP id 8so1759089qwg.32 for ; Mon, 05 Jul 2010 07:03:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.45.22 with SMTP id c22mr1464494qaf.379.1278338584947; Mon, 05 Jul 2010 07:03:04 -0700 (PDT) Received: by 10.224.36.194 with HTTP; Mon, 5 Jul 2010 07:03:04 -0700 (PDT) In-Reply-To: References: Date: Mon, 5 Jul 2010 19:33:04 +0530 Message-ID: Subject: Re: using APR in Axis2/C From: Samisa Abeysinghe To: Apache AXIS C User List Content-Type: multipart/alternative; boundary=00c09fa21cb4422c84048aa46562 X-Virus-Checked: Checked by ClamAV on apache.org --00c09fa21cb4422c84048aa46562 Content-Type: text/plain; charset=ISO-8859-1 When we developed the Axis2/C httpd module, we did not consider opening up APR API from the module. It is true that we plug the alloc and free to apr functions. However, we have not thought at all about the user extending this. I would say, if you want to go down that path, then you got to do it at your own risk. :) We have used our own pool to guard against httpd coming and cleaning up our env and the like when it wants. If the cleaning is unpredictable, we will not be able to assume that env will be there when we want it to, across requests. Samisa... On Mon, Jul 5, 2010 at 7:06 PM, Sam Carleton wrote: > On Fri, Jun 25, 2010 at 11:46 PM, Sam Carleton > wrote: > >> On Fri, Jun 25, 2010 at 10:39 PM, Sam Carleton < >> scarleton@miltonstreet.com> wrote: >> >>> All my Axis2/C services run in Apache. Is there any way to get at the >>> apr_pool_t parameter in the service so I can use APR functions? The main >>> functions I am looking for are things like apr_dir_open, >>> apr_dir_close,apr_dir_read, and apr_dir_rewind. >>> >> >> I did some hunting and it looks like I can use: >> env->allocator->local_pool. Is that correct? >> >> Also, I was noticed that the axis2_handler is calling apr_pool_create_ex() >> and NOT sending in a parent. From what I understand of apr, modules should >> not be creating their own pool, but creating sub pools off of the main >> application. What is the reasoning for Axis2 creating it's own pool and not >> a sub pool off of Apache? >> > > Since it has been 9 days since I asked this and no one has answered, this > leads me to believe the answer is unknown. Would this be a fair assumption? > > > Sam > Samisa Abeysinghe VP Engineering WSO2 Inc. http://wso2.com http://wso2.org --00c09fa21cb4422c84048aa46562 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable When we developed the Axis2/C httpd module, we did not consider opening up = APR API from the module.=A0

It is true that we plug the = alloc and free to apr functions.=A0

However, we ha= ve not thought at all about the user extending this. I would say, if you wa= nt to go down that path, then you got to do it at your own risk. :)

We have used our own pool to=A0guard=A0against httpd co= ming and cleaning up our env and the like when it wants. If the cleaning is= unpredictable, we will not be able to assume that env will be there when w= e want it to, across requests.

Samisa...



On Mon, Jul 5, 2010 at 7:06 PM, Sam Carleton <scarleton@miltonstre= et.com> wrote:
=
On Fri, Jun 25, 2010 at 11:46 PM, Sam Carleton <scarleton@miltonstreet.com> wrote:
On Fri, Jun 25, 2010 at 10:39 PM, Sam Carle= ton <scarleton@miltonstreet.com> wrote:
All my Axis2/C services run in Apache.=A0 Is there any way to get at the ap= r_pool_t parameter in the service so I can use APR functions?=A0 The main f= unctions I am looking for are things like apr_dir_open, apr_dir_close,apr_d= ir_read, and apr_dir_rewind.

I did some hunting and it looks like I can use:= =20 env->allocator->local_pool.=A0 Is that correct?

Also, I was no= ticed that the axis2_handler is calling apr_pool_create_ex() and NOT sendin= g in a parent.=A0 From what I understand of apr, modules should not be crea= ting their own pool, but creating sub pools off of the main application.=A0= What is the reasoning for Axis2 creating it's own pool and not a sub p= ool off of Apache?

Since it has been 9 days sinc= e I asked this and no one has answered, this leads me to believe the answer= is unknown.=A0 Would this be a fair assumption?

Sam

Samisa Abeysinghe
VP Engineer= ing
WSO2 Inc.
http:= //wso2.com
http://wso2.org


--00c09fa21cb4422c84048aa46562--