Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 7796 invoked from network); 8 Apr 2005 11:32:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Apr 2005 11:32:58 -0000 Received: (qmail 34729 invoked by uid 500); 8 Apr 2005 11:32:49 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 34716 invoked by uid 500); 8 Apr 2005 11:32:49 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 34702 invoked by uid 99); 8 Apr 2005 11:32:49 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from out1.smtp.messagingengine.com (HELO out1.smtp.messagingengine.com) (66.111.4.25) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 08 Apr 2005 04:32:47 -0700 Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 33EC2C715E3 for ; Fri, 8 Apr 2005 07:32:45 -0400 (EDT) X-Sasl-enc: k5SQb4pVIWJND6cOkB3xLA 1112959965 Received: from [10.0.0.3] (elfriedeholmes.demon.co.uk [80.177.165.206]) by www.fastmail.fm (Postfix) with ESMTP id DD4CB2553F for ; Fri, 8 Apr 2005 07:32:44 -0400 (EDT) Message-ID: <42566BD9.601@upaya.co.uk> Date: Fri, 08 Apr 2005 12:32:41 +0100 From: Upayavira User-Agent: Mozilla Thunderbird 0.9 (X11/20041124) X-Accept-Language: en-us, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: Best way to initialize Context, Session and Request attributes References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N lists@kuhnle.net wrote: > Hi, > > in my webapp I need to initialize the Context, Session and Request > attributes, e.g. with database connections, message queues etc. What is > the best way to do this in Cocoon? Right now I'm using actions, but this > is not satisfactory, as I have to put the action in many places in my > sitemaps. Is there a better way to do this, e.g. some kind of hook that is > called when Contexts, Sessions and Requests are created and disposed? Can't you just say: