Return-Path: Delivered-To: apmail-incubator-geronimo-dev-archive@www.apache.org Received: (qmail 22759 invoked from network); 2 May 2004 18:28:24 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 May 2004 18:28:24 -0000 Received: (qmail 89406 invoked by uid 500); 2 May 2004 18:28:11 -0000 Delivered-To: apmail-incubator-geronimo-dev-archive@incubator.apache.org Received: (qmail 88899 invoked by uid 500); 2 May 2004 18:28:08 -0000 Mailing-List: contact geronimo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-dev@incubator.apache.org Received: (qmail 88882 invoked from network); 2 May 2004 18:28:08 -0000 Received: from unknown (HELO minuteman.sluggy.com) (64.106.159.160) by daedalus.apache.org with SMTP; 2 May 2004 18:28:08 -0000 Received: by minuteman.sluggy.com (Postfix, from userid 1005) id 6CE005262A; Sun, 2 May 2004 14:28:12 -0400 (EDT) Received: from [10.0.1.2] (pcp09154864pcs.verona01.nj.comcast.net [69.240.72.231]) by minuteman.sluggy.com (Postfix) with ESMTP id DF1D05261B for ; Sun, 2 May 2004 14:28:09 -0400 (EDT) In-Reply-To: References: <544E89F8-9BC1-11D8-85A7-000393D47E44@sluggy.com> Message-Id: <72CD54CF-9C66-11D8-A7E4-000393D47E44@sluggy.com> From: Brendan W.McAdams Subject: Re: ?Enhanced? Lifecycle Interface for Application Developers Date: Sun, 2 May 2004 14:28:03 -0400 To: geronimo-dev@incubator.apache.org X-Mailer: Apple Mail (2.613) X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on minuteman.sluggy.com X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 X-Sanitizer: This message has been sanitized by Anomy at minuteman.sluggy.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII"; format="flowed" Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Out of curiosity, What events will be supported, and at what level? (E.g. Application only, or sub module lifecycles?) --- Brendan W. McAdams bmcadams@twodot.org "I am free, no matter what rules surround me. If I find them tolerable, I tolerate them; if I find them too obnoxious, I break them. I am free because I know that I alone am morally responsible for everything I do." --- Professor Bernardo de La Paz Robert A. Heinlein "The Moon Is A Harsh Mistress" On May 2, 2004, at 1:54 PM, Dain Sundstrom wrote: > I plan on implementing this with GBeans, but it can't be done with > depenencies. I plan on supporting this by adding a general purpose > event listener system to GBeans. Since JSR-77 already defines > life-cycle events that match up to your proposed interface it should > be trivial to implement (once I add the not so trivial event system). > > -dain > > On May 1, 2004, at 6:18 PM, Brendan W.McAdams wrote: > >> Alan Cabrera was kind enough to point out a good question: Why not >> use GBeans? >> >> There was another component to the conversation regarding this which >> I neglected to include: It *IS* possible to interface the GBeans for >> lifecycle, but from what I understand there isn't "orderly" >> deployment. I don't know this section of things too well, but from >> what I understand there is a necessity to define various dependencies >> if you were to use Gbeans for this. >> >> By defining a LifecycleInterface, conceivably dependencies could be >> configured on the fly based on the modules defined in application.xml >> >> Dain & Jeremy, can you guys backfill this a bit? I'll go back >> through the IRC log as well and pull up that piece of the >> conversation. >> >> Thanks, >> >> Brendan >> --- >> Brendan W. McAdams >> bmcadams@twodot.org >> >> "I am free, no matter what rules surround me. If I find them >> tolerable, I tolerate them; if I find them too obnoxious, I break >> them. I am free because I know that I alone am morally responsible >> for everything I do." --- Professor Bernardo de La Paz >> Robert A. Heinlein "The Moon Is A Harsh Mistress" >> On May 1, 2004, at 6:46 PM, Brendan W.McAdams wrote: >> >>> I'm doing my best to collate some of the information provided here >>> by several people ; it's my hope they will put in their two cents as >>> well in reply and straighten out any misquotes I may make, and help >>> flesh this idea out. >>> >>> I had a conversation with Jeremy Boynes on Thursday Night, to which >>> Dain gave some input on Friday morning, regarding some of the >>> Application Level Lifecycle interfacing that BEA provides in their >>> Weblogic product. >>> >>> Using the weblogic-application.xml file (Weblogic's custom >>> supplement to application.xml for EAR files), one is able to define >>> a Lifecycle application (or more than one ; there is no limit) which >>> implements a basic Lifecycle interface: >>> >>> preStart - before contents (modules) of application (EAR) are >>> loaded, this method is invoked >>> postStart - after all contents (modules - ejbs, etc) are loaded and >>> initialised, this method is invoked >>> preStop - when the application (or encompassing appserver) signals >>> it is being stopped, this is invoked before signalling modules to >>> stop >>> postStop - once all modules in the application have been shut down, >>> this method is invoked >>> >>> As I stated, once you've written a class that implements the >>> interface and these methods, you simply declare it in a >>> block in weblogic-application.xml. When the EAR file is deployed, >>> the AppServer automatically picks up the Lifecycle app, and sends >>> each change of status (one of the four) notification through it. >>> >>> I realise it may sound like I'm rambling but I do have a point... I >>> think that a similar facility would help Geronimo greatly. >>> As a usage example, we use it at my company to preload the entity >>> cache with the approximately 15,000 bond offers that are active in >>> our marketplace at a given time. [This way, we load the entity >>> cache before the system is available, preventing 'database load' >>> slowdown the first time someone does a large market search]. We are >>> also using it to initialise certain timer events, and fire off >>> events to our Message Driven Beans to setup the marketplace. There >>> are, I am sure, plenty of other beneficial uses that we haven't even >>> begun to touch on. >>> >>> The conversations with Jeremy and Dain yielded some good feedback , >>> and I believe they agree with the idea. >>> >>> One of the things suggested [by Jeremy] was allowing lifecycle >>> definitions even at the level of individual modules of an >>> application, to do more fine tuned control. >>> >>> On the same lines, we discussed allowing access from the lifecycle >>> level to the Local interfaces; from what I understand of the EJB >>> container contract it's ok to let other services in the appserver >>> access local interfaces [BEA doesn't allow it directly but instead >>> optimises away the RMI calls on any remote bean invocation within >>> the AppServer]. This would certainly make the lifecycle even more >>> powerful [in our case for Beans which are Local only, our lifecycle >>> invokes a session bean to do the job]. >>> >>> I believe I've put a good bit of the information compiled here, of >>> course if anyone has feedback please post it back to the list. >>> >>> Regards, >>> >>> Brendan >>> --- >>> Brendan W. McAdams >>> bmcadams@twodot.org >>> >>> "I am free, no matter what rules surround me. If I find them >>> tolerable, I tolerate them; if I find them too obnoxious, I break >>> them. I am free because I know that I alone am morally responsible >>> for everything I do." --- Professor Bernardo de La Paz >>> Robert A. Heinlein "The Moon Is A Harsh Mistress" >>> >> >