Return-Path: Delivered-To: apmail-incubator-beehive-user-archive@www.apache.org Received: (qmail 50542 invoked from network); 29 Nov 2004 16:42:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 29 Nov 2004 16:42:59 -0000 Received: (qmail 61123 invoked by uid 500); 29 Nov 2004 16:42:56 -0000 Delivered-To: apmail-incubator-beehive-user-archive@incubator.apache.org Received: (qmail 61098 invoked by uid 500); 29 Nov 2004 16:42:56 -0000 Mailing-List: contact beehive-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Beehive Users" Delivered-To: mailing list beehive-user@incubator.apache.org Received: (qmail 61084 invoked by uid 99); 29 Nov 2004 16:42:56 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from sccrmhc12.comcast.net (HELO sccrmhc12.comcast.net) (204.127.202.56) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 29 Nov 2004 08:42:54 -0800 Received: from [127.0.0.1] (c-24-11-64-124.client.comcast.net[24.11.64.124]) by comcast.net (sccrmhc12) with ESMTP id <2004112916424901200igloce>; Mon, 29 Nov 2004 16:42:50 +0000 Message-ID: <41AB5185.5070100@envoisolutions.com> Date: Mon, 29 Nov 2004 11:42:45 -0500 From: Dan Diephouse User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Beehive Users Subject: Lifecycle Questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I am trying to understand the Context Lifecycle events and how I can use them. Using the onAcquire/onRelease/onCreate methods seems simple enough but I am confused as to when they are actually called. So I was wondering if someone could help me fill in the blanks here for the different cases: Within a JSP Page: onAcquire - called at the beginning of the scope (page, request, etc) onRelease - called at the end of the scope (page, request, etc) onCreate - called when the control is initialized at the beginning of a a new scope??? Within a Controller: onAcquire - called once when first used?? onRelease - called when the application exits?? onCreate - called once when first initialized?? Within another Control: onAcquire/onRelease/onCreate: called whenever the parent control's lifecycle methods are called I'm trying to figure out where I can put a control so it receives the lifecycle events for the page request to manage hibernate sessions/transactions, and from the above it looks like within the JSP page itself is my only choice. Thanks, - Dan -- Dan Diephouse Envoi Solutions LLC http://envoisolutions.com/people/dan