Return-Path: Delivered-To: apmail-jakarta-avalon-dev-archive@apache.org Received: (qmail 61455 invoked from network); 22 Nov 2002 05:03:41 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 22 Nov 2002 05:03:41 -0000 Received: (qmail 12901 invoked by uid 97); 22 Nov 2002 05:04:49 -0000 Delivered-To: qmlist-jakarta-archive-avalon-dev@jakarta.apache.org Received: (qmail 12885 invoked by uid 97); 22 Nov 2002 05:04:48 -0000 Mailing-List: contact avalon-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon Developers List" Reply-To: "Avalon Developers List" Delivered-To: mailing list avalon-dev@jakarta.apache.org Received: (qmail 12873 invoked by uid 98); 22 Nov 2002 05:04:48 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <3DDDBAAE.3060209@tanukisoftware.com> Date: Fri, 22 Nov 2002 14:03:42 +0900 From: Leif Mortenson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en, ja, en-us MIME-Version: 1.0 To: Avalon Developers List Subject: Any history before I patch the ECM? Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N A user over on avalon-users has pointed out that the ECM as it is currently implemented makes it impossible to detect whether or not there were any exceptions thrown in the initialize() method of the container. All exceptions are currently caught and logged. But the method always returns. The configure method on the other hand both logs and rethrows the exceptions. I agree with the user that exceptions encountered within initialize should really be rethrown as well. Before making this change, I wanted to make sure that no one was aware of any reason why this should not be done. Exceptions will arise in this method if there are any exceptions thrown while initializing any threads-safe components or pooled components which are created at pool initialization. These can be caused by anything, like a misconfigured username for a database connection, to the DB being down. etc... When things are setup correctly, this should never happen. But this will make it possible for applications using the ECM to respond to configuration problems. Cheers, Leif Here is my proposed diff: cvs diff -u ExcaliburComponentManager.java Index: ExcaliburComponentManager.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentManager.java,v retrieving revision 1.20 diff -u -r1.20 ExcaliburComponentManager.java --- ExcaliburComponentManager.java 7 Nov 2002 18:26:23 -0000 1.20 +++ ExcaliburComponentManager.java 22 Nov 2002 04:59:55 -0000 @@ -528,6 +528,9 @@ getLogger().error( "Caught an exception trying to initialize " + "the component handler.", e ); } + + // Rethrow the exception + throw e; } } @@ -562,6 +565,9 @@ { getLogger().error( "Caught an exception trying to initialize " + "the component handler.", e ); + + // Rethrow the exception + throw e; } } } -- To unsubscribe, e-mail: For additional commands, e-mail: