Return-Path: Delivered-To: apmail-jakarta-avalon-phoenix-dev-archive@apache.org Received: (qmail 34071 invoked from network); 6 Mar 2002 08:50:03 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 6 Mar 2002 08:50:03 -0000 Received: (qmail 11842 invoked by uid 97); 6 Mar 2002 08:50:16 -0000 Delivered-To: qmlist-jakarta-archive-avalon-phoenix-dev@jakarta.apache.org Received: (qmail 11799 invoked by uid 97); 6 Mar 2002 08:50:15 -0000 Mailing-List: contact avalon-phoenix-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon-Phoenix Developers List" Reply-To: "Avalon-Phoenix Developers List" Delivered-To: mailing list avalon-phoenix-dev@jakarta.apache.org Received: (qmail 11788 invoked from network); 6 Mar 2002 08:50:14 -0000 X-Sent: 6 Mar 2002 08:50:12 GMT From: "Leo Simons" To: "Avalon-Phoenix Developers List" Subject: RE: managing applications Date: Wed, 6 Mar 2002 09:50:13 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Importance: Normal In-Reply-To: <200203060828.g268SG604713@mail016.syd.optusnet.com.au> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N > In this case I believe it is the responsibility of the Block to kill = the=20 > connection - I usually do it in dispose. so should Block extend Disposable? Dunno. Should a stop() of an application dispose() a block? > > Or should there be > > more intelligence in DefaultApplication > > to avoid problems like aforementioned? >=20 > Got any ideas on how we would do this? 1) check whether Block implements Stoppable 2) if yes, stop() 3) if not, check for Disposable 4) if yes, dispose() 5) if not, dereference the block completely, then call System.gc() (...) I'm being rather stupid.=20 if: - the Block binds resources during initialize() - the Block does not bind resource during start() - the Block does not unbing resource during stop() - the Block unbinds resource during dispose() - calling initialize() on the Application calls initialize() on its Blocks - calling start() on the Application calls start() on its Blocks - calling stop() on the Application calls stop() on its Blocks - calling dispose() on the Application calls dispose() on its Blocks there is no problem. I'm guessing there's a little logic error in both XCommander and in DefaultApplication, which results in a bigger problem. Anyway, going away for 1 1/2 week, so this will have to wait a little =3D) cheers, - Leo -- To unsubscribe, e-mail: For additional commands, e-mail: