Status Report AvalonMerlin 07 January 2002

Over the past couple of months work has focussed on the assembly, meta and Merlin packages as part of the transition out of Excalibur and into the avalon-sandbox project. The transition involved a number of changes that are listed below:

#refactoring of the classloading mechanisms (following Berin's suggestions from way back) taking into consideration the discussions concerning a profile driven container #incorporation of requirements posted under the Cocoon general discussions relating to blocks and overall component management requirements (Stefano, et. al.) #incorporation of support under AvalonAssembly for the concepts and direction established in the "context discussions" including the ability to customize your contextualization interface (Leo's process) #clean separation of the assembly concerns under AvalonAssembly from containment concerns under AvalonMerlin (Steve) #introduction of the notion of "blocks" as composite components (Cocoon requirements) #improvements in XML schemas for the container and profile mode so that naming matches usage (Steve) #introduction of a bootstrap system that is independent of the extension directories or any other jar file (enabling support for Java WebStart based applications (Gary with respect to { { { WebStart } } } requirements) #addition of test cases #elimination of the necessity to explicitly declare components in jar file (files are now auto scanned) (Steve) #separation of the kernel configuration form the deployment configuration (based on suggestions from Vinay Chandran and others)

Structurally speaking - the excalibur/assembly (Merlin 2.0) package has been split into two distinct packages - avalon-sandbox/assembly and avalon-sandbox/merlin (Merlin 2.1). The new assembly is independent of a containment strategy - it basically handles all of the stuff to do with component deployment. The avalon-sandbox/merlin handles the hierarchical containment mode and the implementation of a block concept. Just as the assembly package separates component management under an Appliance class, the Merlin package separates containment management under a Block class. Operationally speaking there are some changes that need to be considered. The avalon-sandbox.merlin package has introduced some changes that will require some client rework - not much, but important non-the-less. These changes include:

#the kernel.xml is now limited to "just the kernel" - i.e. it does not contain the definition of the container hierarchy, instead - the kernel reads a blocks.xml file which tells the kernel the location of blocks to be loaded. Each block is an semi-independent container hierarchy #the blocks.xml file contains references to the set of blocks to load. Each block is a jar file containing the resource BLOICK-INF/block.xml. The block.xml contains the container hierarchy definition. The container definition has been improved with the separation of interface versus implementation - in effect each block declares the service it provides, and the implementation in the form of a container hierarchy under an <implementation> tag. The <implementation> is effectively a root container.

Example <block> defintion:

  <block> 

   <!-- Service provided by this block. --> 

   <services>       <service type="org.apache.avalon.playground.StandardService:1.1" />     </services> 

   <!-- Block implementation. --> 

   <implementation src="external.xml"> 

     <!-- an engine declaration can contain a classpath and libraries element --> 

     <engine/> 

     <!-- appliance declarations --> 

     <appliance name="standard" class="org.apache.avalon.playground.StandardComponent" activation="startup">         <context class="org.apache.avalon.playground.StandardContextImp"/>       </appliance> 

     <-- nested container declarations --> 

     <container name="something"> 

        <!-- engine, appliance and other nested containers go here --> 

     </container> 

   </implementation> 

  </block> 

Demos are available in both the AvalonAssembly and Merlin packages that incorporates these enhancements - but documentation is not up to the same level - more work to be done in that area following the reshuffle.

Aside from documentation updating, there are still a couple of more things to be done before Merlin 2.1 stabilizes - namely the introduction of dynamic meta into blocks - so that things like dependencies and services can be resolved based on the computational requirements of the containment solution. However - what is in place today the current AvalonMerlin implementation (version 2.1) is functionally equivalent or exceeding to 2.0 and is structurally a lot cleaner.

Just for reference (and because it isn't documented anywhere just yet) to run the Merlin 2.1 demo (which includes a totally custom contexualization interface demo) all you need to do is checkout the Avalon, excalibur and sandbox repositories, then:

  $ cd avalon-sandbox    $ cd merlin    $ ant    $ java -classpath build\lib\avalon-merlin-bootstrap-2.1.jar org.apache.avalon.merlin.bootstrap.Merlin merlin.properties 

Next step - cleaning up - polishing documentation - and getting in place a workplan for remaining feature additions and/or structural adjustments.

StephenMcConnell

AvalonMerlinStatusReportOne (last edited 2009-09-20 23:16:48 by localhost)