Return-Path: Delivered-To: apmail-ofbiz-commits-archive@www.apache.org Received: (qmail 59693 invoked from network); 22 Mar 2011 15:20:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Mar 2011 15:20:58 -0000 Received: (qmail 7620 invoked by uid 500); 22 Mar 2011 15:20:58 -0000 Delivered-To: apmail-ofbiz-commits-archive@ofbiz.apache.org Received: (qmail 7591 invoked by uid 500); 22 Mar 2011 15:20:58 -0000 Mailing-List: contact commits-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list commits@ofbiz.apache.org Received: (qmail 7584 invoked by uid 99); 22 Mar 2011 15:20:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2011 15:20:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Mar 2011 15:20:56 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B995623888CD; Tue, 22 Mar 2011 15:20:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1084211 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupLoader.java Date: Tue, 22 Mar 2011 15:20:23 -0000 To: commits@ofbiz.apache.org From: adrianc@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110322152023.B995623888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: adrianc Date: Tue Mar 22 15:20:23 2011 New Revision: 1084211 URL: http://svn.apache.org/viewvc?rev=1084211&view=rev Log: StartupLoader.java JavaDocs - no functional change. Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupLoader.java Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupLoader.java?rev=1084211&r1=1084210&r2=1084211&view=diff ============================================================================== --- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupLoader.java (original) +++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupLoader.java Tue Mar 22 15:20:23 2011 @@ -19,30 +19,44 @@ package org.ofbiz.base.start; /** - * StartupLoader - Interface for loading server startup classes - * + * An object that loads server startup classes. + *

+ * When OFBiz starts, the main thread will create the StartupLoader instance and + * then call the loader's load method. If the method returns without + * throwing an exception the loader will be added to a list of initialized loaders. + * After all instances have been created and initialized, the main thread will call the + * start method of each loader in the list. When OFBiz shuts down, a + * separate shutdown thread will call the unload method of each loader. + * Implementations should anticipate asynchronous calls to the methods by different + * threads. + *

+ * */ public interface StartupLoader { /** - * Load a startup class + * Load a startup class. * - * @param config Startup config - * @param args Input arguments - * @throws StartupException + * @param config Startup config. + * @param args Command-line arguments. + * @throws StartupException If an error was encountered. Throwing this exception + * will halt loader loading, so it should be thrown only when OFBiz can't + * operate without it. */ public void load(Start.Config config, String args[]) throws StartupException; /** - * Start the startup class - * @throws StartupException + * Start the startup class. This method must not block - implementations + * that require thread blocking must create a separate thread and then return. + * + * @throws StartupException If an error was encountered. */ public void start() throws StartupException; /** - * Stop the container + * Stop the startup class. This method must not block. * - * @throws StartupException + * @throws StartupException If an error was encountered. */ public void unload() throws StartupException; }