Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5DD8D10F66 for ; Thu, 6 Jun 2013 22:13:30 +0000 (UTC) Received: (qmail 9120 invoked by uid 500); 6 Jun 2013 22:13:30 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 9090 invoked by uid 500); 6 Jun 2013 22:13:30 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 9081 invoked by uid 99); 6 Jun 2013 22:13:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jun 2013 22:13:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of seanmckaybeck@gmail.com designates 74.125.83.50 as permitted sender) Received: from [74.125.83.50] (HELO mail-ee0-f50.google.com) (74.125.83.50) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jun 2013 22:13:25 +0000 Received: by mail-ee0-f50.google.com with SMTP id d49so1400187eek.37 for ; Thu, 06 Jun 2013 15:13:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=h668gcM8qQw65tVFq7WcKvYCtjd49CWNr65JtLGOYSA=; b=meXGfxLfoP/Y/SsQrbl7octO4cxsmvB4K2mKiEKE2BbnqUx2EUvdPOQ5Gdb8KCJItL 7JD75o016I2hD/KPFQ5eBl+ouJseYgKpKwQKTlr/sCXhxC+VXwYRM4kjfLg5jOTb/TuU YK/qwrmJLR3jE6mowXNPYBOhxGEekBnYMhqnzwThs2lqMEvP0uW80AebhM0QVwFUnoBp 4lNjBaDkmPZwy+cFbwAi559Pd/nzLnuHf4/ETc14eDxATOeric8hUrt+3OA1B8zmSr9/ On6ER5ED+9CMdmm1BGYUy7afZmBzzI1Z4iVBciJ+GqAQW60b/hpu6UavCjci0tPtYQfD oCZg== MIME-Version: 1.0 X-Received: by 10.15.86.74 with SMTP id h50mr35252734eez.97.1370556784631; Thu, 06 Jun 2013 15:13:04 -0700 (PDT) Received: by 10.14.47.78 with HTTP; Thu, 6 Jun 2013 15:13:04 -0700 (PDT) In-Reply-To: <51B108F4.5050409@joe-lewis.com> References: <51B0FC25.8070308@joe-lewis.com> <51B108F4.5050409@joe-lewis.com> Date: Thu, 6 Jun 2013 16:13:04 -0600 Message-ID: Subject: Re: Tear down of module on server stop From: Sean Beck To: modules-dev@httpd.apache.org Content-Type: multipart/alternative; boundary=089e0160cf9a4b060404de839ea4 X-Virus-Checked: Checked by ClamAV on apache.org --089e0160cf9a4b060404de839ea4 Content-Type: text/plain; charset=ISO-8859-1 So in the post_config hook I set up the connections then register a clean up function to terminate the connections? On Thu, Jun 6, 2013 at 4:11 PM, Joe Lewis wrote: > On 06/06/2013 03:27 PM, Sean Beck wrote: > >> Would I register the pool clean up function in the module struct? >> >> >> On Thu, Jun 6, 2013 at 3:16 PM, Joe Lewis wrote: >> >> On 06/06/2013 03:14 PM, Sean Beck wrote: >>> >>> Where does the tear down happen when httpd is stopped? I have some code >>>> for >>>> sending messages to ActiveMQ in my module and I would like to only make >>>> a >>>> connection on startup rather than every time someone connects, but then >>>> I >>>> need to destroy the connection when the server stops. >>>> >>>> Also, register_hooks is called when the server starts, correct? I am >>>> thinking I would put the code for connecting to ActiveMQ in there. >>>> >>>> Thanks! >>>> >>>> >>>> Register a pool clean up function with the pool for the server record. >>> That should be called when the pool is removed. >>> >>> Joe >>> >>> > Try doing this in the post_config hook, which is probably where you set > the connections up. > > Joe > --089e0160cf9a4b060404de839ea4--