Return-Path: Delivered-To: apmail-avalon-cvs-archive@avalon.apache.org Received: (qmail 1884 invoked by uid 500); 2 Apr 2003 15:58:06 -0000 Mailing-List: contact cvs-help@avalon.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list cvs@avalon.apache.org Received: (qmail 1873 invoked by uid 500); 2 Apr 2003 15:58:06 -0000 Received: (qmail 1870 invoked from network); 2 Apr 2003 15:58:05 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 2 Apr 2003 15:58:05 -0000 Received: (qmail 95810 invoked by uid 1438); 2 Apr 2003 15:58:05 -0000 Date: 2 Apr 2003 15:58:05 -0000 Message-ID: <20030402155805.95809.qmail@icarus.apache.org> From: mcconnell@apache.org To: avalon-sandbox-cvs@apache.org Subject: cvs commit: avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/block/impl DefaultBlockLoader.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N mcconnell 2003/04/02 07:58:05 Modified: merlin/merlin-core/src/java/org/apache/avalon/merlin/block/impl DefaultBlockLoader.java Log: Addition of support for simulated package deployment. Revision Changes Path 1.5 +39 -5 avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/block/impl/DefaultBlockLoader.java Index: DefaultBlockLoader.java =================================================================== RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/java/org/apache/avalon/merlin/block/impl/DefaultBlockLoader.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- DefaultBlockLoader.java 29 Mar 2003 03:25:57 -0000 1.4 +++ DefaultBlockLoader.java 2 Apr 2003 15:58:05 -0000 1.5 @@ -347,7 +347,11 @@ } URL base = getBasePath( path ); - Configuration implementation = block.getChild( "implementation" ); + Configuration implementation = block.getChild( "implementation", false ); + if( implementation == null ) + { + implementation = block.getChild( "container" ); + } Configuration engineConfig = implementation.getChild( "engine" ); EngineClassLoader engine = null; try @@ -523,9 +527,16 @@ } catch( Throwable e ) { - final String error = - "Unable to resolve block description on path: " + uri; - throw new BlockException( error, e ); + try + { + return createConfiguration( uri + "BLOCK-INF/block.xml" ); + } + catch( Throwable ce ) + { + final String error = + "Unable to resolve block description on path: " + uri; + throw new BlockException( error, e ); + } } } } @@ -567,6 +578,13 @@ try { descriptor = CREATOR.createContainerDescriptor( type, config, name ); + + // + // from the container implementor point of view a block is all + // about the creation of appliance instances - the following code + // fragment pulls in all appliance declarations + // + Configuration[] children = config.getChildren( "appliance" ); for( int i=0; i