CVS: jcontainer/loom/engine/src/java/org/jcontainer/loom/components/application BlockEntry.java,1.7,1.8 BlockInvocationHandler.java,1.2,1.3 BlockResourceProvider.java,1.11,1.12 DefaultApplication.java,1.15,1.16 DefaultBlockContext.java,1.3,1.4 DependencyGraph.java,1.5,1.6 ListenerSupport.java,1.5,1.6

Peter Donald <pdonald-yCVjj/[email protected]> Sat, 29 Nov 2003 07:44:49 -0600
Newsgroups gmane.comp.java.jcontainer.cvs
Message-ID <[email protected]>
Update of /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/application
In directory hogshead.codehaus.org:/tmp/cvs-serv31016/loom/engine/src/java/org/jcontainer/loom/components/application

Modified Files:
	BlockEntry.java BlockInvocationHandler.java 
	BlockResourceProvider.java DefaultApplication.java 
	DefaultBlockContext.java DependencyGraph.java 
	ListenerSupport.java 
Log Message:
Remove email addie

Index: BlockEntry.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/application/BlockEntry.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- BlockEntry.java	3 Nov 2003 06:43:15 -0000	1.7
+++ BlockEntry.java	29 Nov 2003 13:44:15 -0000	1.8
@@ -88,13 +88,13 @@
 
 import org.jcontainer.loom.components.util.info.ComponentInfo;
 import org.jcontainer.loom.components.util.info.ServiceDescriptor;
-import org.jcontainer.loom.components.util.profile.ComponentProfile;
 import org.jcontainer.loom.components.util.metadata.ComponentTemplate;
+import org.jcontainer.loom.components.util.profile.ComponentProfile;
 
 /**
  * This is the structure describing each block before it is loaded.
  *
- * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
+ * @author Peter Donald
  */
 class BlockEntry
 {
@@ -134,11 +134,14 @@
     {
         invalidate();
 
-        if( null != object && !m_componentProfile.getTemplate().isDisableProxy() )
+        if( null != object &&
+            !m_componentProfile.getTemplate().isDisableProxy() )
         {
             final ComponentInfo blockInfo = m_componentProfile.getInfo();
-            final Class[] interfaces = getServiceClasses( object, blockInfo.getServices() );
-            m_invocationHandler = new BlockInvocationHandler( object, interfaces );
+            final Class[] interfaces = getServiceClasses( object,
+                                                          blockInfo.getServices() );
+            m_invocationHandler =
+            new BlockInvocationHandler( object, interfaces );
         }
         m_object = object;
     }
@@ -182,7 +185,8 @@
         {
             try
             {
-                classes[ i ] = classLoader.loadClass( services[ i ].getType() );
+                classes[ i ] =
+                classLoader.loadClass( services[ i ].getType() );
             }
             catch( final Throwable throwable )
             {

Index: BlockInvocationHandler.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/application/BlockInvocationHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- BlockInvocationHandler.java	17 Aug 2003 18:27:32 -0000	1.2
+++ BlockInvocationHandler.java	29 Nov 2003 13:44:15 -0000	1.3
@@ -92,19 +92,20 @@
 import java.lang.reflect.Proxy;
 
 /**
- * This makes a dynamic proxy for an object.  The object can be represented
- * by one, some or all of it's interfaces.
+ * This makes a dynamic proxy for an object.  The object can be represented by
+ * one, some or all of it's interfaces.
  *
  * <p>Amongst other things, it's an anti hackinge measure.  Suitable armed code
  * could have case an interface for a thing back to it's impl and used methods
  * and properties that were not it's authors intention.  Reflection too allows
  * some powerful introspection things and some traversal even more things
- * including private member vars by a serialisation trick... hence the transient.</p>
+ * including private member vars by a serialisation trick... hence the
+ * transient.</p>
  *
- * <p>This proxy also allows itself to be invalidated thus making it
- * impossible to call methods on a Block after it has been shutdown.</p>
+ * <p>This proxy also allows itself to be invalidated thus making it impossible
+ * to call methods on a Block after it has been shutdown.</p>
  *
- * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
+ * @author Peter Donald
  * @author <a href="mailto:Paul_Hammant-/[email protected]">Paul Hammant</a>
  * @version CVS $Revision$ $Date$
  */
@@ -115,7 +116,8 @@
     private transient Object m_proxy;
 
     /**
-     * Create a proxy object that has specified interfaces implemented by proxy.
+     * Create a proxy object that has specified interfaces implemented by
+     * proxy.
      *
      * @param object the underlying object
      * @param interfaces the interfaces to proxy
@@ -129,8 +131,7 @@
     }
 
     /**
-     * Invalidate Proxy making it impossible to call methods
-     * of real-object.
+     * Invalidate Proxy making it impossible to call methods of real-object.
      */
     public void invalidate()
     {
@@ -149,8 +150,8 @@
     }
 
     /**
-     * Invoke the specified method on underlying object.
-     * This is called by proxy object.
+     * Invoke the specified method on underlying object. This is called by proxy
+     * object.
      *
      * @param proxy the proxy object
      * @param method the method invoked on proxy object

Index: BlockResourceProvider.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/application/BlockResourceProvider.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- BlockResourceProvider.java	3 Nov 2003 06:43:15 -0000	1.11
+++ BlockResourceProvider.java	29 Nov 2003 13:44:15 -0000	1.12
@@ -113,24 +113,21 @@
 import org.jcontainer.loom.interfaces.ApplicationContext;
 
 /**
- * The accessor used to access resources for a particular
- * Block or Listener.
+ * The accessor used to access resources for a particular Block or Listener.
  *
- * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
+ * @author Peter Donald
  * @version $Revision$ $Date$
  */
 class BlockResourceProvider
     extends AbstractLogEnabled
     implements ResourceProvider
 {
-    /**
-     * Context in which Blocks/Listeners operate.
-     */
+    /** Context in which Blocks/Listeners operate. */
     private final ApplicationContext m_context;
 
     /**
-     * The Application which this phase is associated with.
-     * Required to build a ComponentManager.
+     * The Application which this phase is associated with. Required to build a
+     * ComponentManager.
      */
     private final Application m_application;
 
@@ -156,7 +153,6 @@
      *
      * @param entry the entry
      * @return a new object
-     * @throws Exception
      */
     public Object createObject( final Object entry )
         throws Exception
@@ -220,11 +216,10 @@
     }
 
     /**
-     * Create a ComponentManager object for a
-     * specific Block. This requires that for
-     * each dependency a reference to providing Block
-     * is aaqiured from the Application and placing it in
-     * {@link ComponentManager} under the correct name.
+     * Create a ComponentManager object for a specific Block. This requires that
+     * for each dependency a reference to providing Block is aaqiured from the
+     * Application and placing it in {@link ComponentManager} under the correct
+     * name.
      *
      * @param entry the entry representing block
      * @return the created ComponentManager
@@ -237,11 +232,10 @@
     }
 
     /**
-     * Create a {@link ServiceManager} object for a
-     * specific Block. This requires that for
-     * each dependency a reference to providing Block
-     * is aaqiured from the Application and placing it in
-     * {@link ServiceManager} under the correct name.
+     * Create a {@link ServiceManager} object for a specific Block. This
+     * requires that for each dependency a reference to providing Block is
+     * aaqiured from the Application and placing it in {@link ServiceManager}
+     * under the correct name.
      *
      * @param entry the entry representing block
      * @return the created ServiceManager
@@ -266,17 +260,19 @@
     private Map createServiceMap( final Object entry )
         throws Exception
     {
-        final BlockEntry blockEntry = getBlockEntry(entry );
+        final BlockEntry blockEntry = getBlockEntry( entry );
         final HashMap map = new HashMap();
         final HashMap sets = new HashMap();
 
         final ComponentInfo info = blockEntry.getInfo();
-        final DependencyDirective[] roles = blockEntry.getTemplate().getDependencies();
+        final DependencyDirective[] roles = blockEntry.getTemplate()
+            .getDependencies();
 
         for( int i = 0; i < roles.length; i++ )
         {
             final DependencyDirective role = roles[ i ];
-            final Object dependency = m_application.getBlock( role.getProviderName() );
+            final Object dependency = m_application.getBlock(
+                role.getProviderName() );
 
             final String key = role.getKey();
             final DependencyDescriptor candidate =
@@ -318,9 +314,11 @@
             if( value instanceof List )
             {
                 final List list = (List)value;
-                final DependencyDescriptor dependency = info.getDependency( key );
+                final DependencyDescriptor dependency = info.getDependency(
+                    key );
 
-                final Object[] result = toArray( list, dependency.getComponentType() );
+                final Object[] result = toArray( list,
+                                                 dependency.getComponentType() );
                 map.put( key, result );
 
                 if( key.equals( dependency.getType() ) )
@@ -342,9 +340,9 @@
     }
 
     /**
-     * Convert specified list into array of specified type.
-     * Note that the class for the type must be loaded from same
-     * classloader as the elements in the list are loaded from.
+     * Convert specified list into array of specified type. Note that the class
+     * for the type must be loaded from same classloader as the elements in the
+     * list are loaded from.
      *
      * @param list the list
      * @param type the classname of type
@@ -366,7 +364,8 @@
         throws Exception
     {
         final ComponentTemplate template = getBlockEntry( entry ).getTemplate();
-        return ConfigurationConverter.toConfiguration( template.getConfiguration() );
+        return ConfigurationConverter.toConfiguration(
+            template.getConfiguration() );
     }
 
     public Parameters createParameters( final Object entry )

Index: DefaultApplication.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/application/DefaultApplication.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- DefaultApplication.java	3 Nov 2003 06:43:15 -0000	1.15
+++ DefaultApplication.java	29 Nov 2003 13:44:15 -0000	1.16
@@ -108,11 +108,10 @@
 import org.realityforge.salt.i18n.Resources;
 
 /**
- * This is the basic container of blocks. A server application
- * represents an aggregation of blocks that act together to form
- * an application.
+ * This is the basic container of blocks. A server application represents an
+ * aggregation of blocks that act together to form an application.
  *
- * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
+ * @author Peter Donald
  * @author Leo Simons
  * @dna.component
  * @mx.component
@@ -134,19 +133,13 @@
 
     private final HashMap m_entries = new HashMap();
 
-    /**
-     * ResourceProvider for blocks.
-     */
+    /** ResourceProvider for blocks. */
     private BlockResourceProvider m_blockAccessor;
 
-    /**
-     * Object to support notification of ApplicationListeners.
-     */
+    /** Object to support notification of ApplicationListeners. */
     private final ListenerSupport m_listenerSupport = new ListenerSupport();
 
-    /**
-     * Object to support running objects through lifecycle phases.
-     */
+    /** Object to support running objects through lifecycle phases. */
     private final LifecycleHelper m_lifecycleHelper = new LifecycleHelper();
 
     ///////////////////////
@@ -168,13 +161,15 @@
         }
         catch( final Throwable t )
         {
-            getLogger().info( "Exception loading listeners:" + t.getMessage() + "\n", t );
+            getLogger().info(
+                "Exception loading listeners:" + t.getMessage() + "\n", t );
             throw new LoomException( t.getMessage(), t );
         }
         try
         {
             final PartitionProfile partition =
-                m_context.getPartitionProfile().getPartition( ContainerConstants.BLOCK_PARTITION );
+                m_context.getPartitionProfile().getPartition(
+                    ContainerConstants.BLOCK_PARTITION );
             final ComponentProfile[] blocks = partition.getComponents();
             for( int i = 0; i < blocks.length; i++ )
             {
@@ -188,7 +183,8 @@
         }
         catch( final Throwable t )
         {
-            getLogger().info( "exception while starting:" + t.getMessage() + "\n" );
+            getLogger().info(
+                "exception while starting:" + t.getMessage() + "\n" );
             t.printStackTrace();
             throw new LoomException( t.getMessage(), t );
         }
@@ -204,7 +200,8 @@
         }
         catch( final Throwable t )
         {
-            getLogger().info( "Exception stopping:" + t.getMessage() + "\n", t );
+            getLogger().info( "Exception stopping:" + t.getMessage() + "\n",
+                              t );
         }
 
         m_running = false;
@@ -222,7 +219,8 @@
     }
 
     /**
-     * @mx.attribute description="the names of the blocks that compose this Application"
+     * @mx.attribute description="the names of the blocks that compose this
+     * Application"
      */
     public String[] getBlockNames()
     {
@@ -259,7 +257,8 @@
     }
 
     /**
-     * @mx.attribute description="the string used to describe the application in the UI."
+     * @mx.attribute description="the string used to describe the application in
+     * the UI."
      */
     public String getDescription()
     {
@@ -275,7 +274,8 @@
     }
 
     /**
-     * @mx.attribute description="True if the application is running or false otherwise."
+     * @mx.attribute description="True if the application is running or false
+     * otherwise."
      */
     public boolean isRunning()
     {
@@ -290,8 +290,10 @@
         throws Exception
     {
         //Setup thread context for calling visitors
-        final ClassLoader loader = Thread.currentThread().getContextClassLoader();
-        Thread.currentThread().setContextClassLoader( m_context.getClassLoader() );
+        final ClassLoader loader = Thread.currentThread()
+            .getContextClassLoader();
+        Thread.currentThread().setContextClassLoader(
+            m_context.getClassLoader() );
 
         try
         {
@@ -304,9 +306,9 @@
     }
 
     /**
-     * Actually perform loading of each individual Listener.
-     * Note that by this stage it is assumed that the Thread Context
-     * has already been setup correctly.
+     * Actually perform loading of each individual Listener. Note that by this
+     * stage it is assumed that the Thread Context has already been setup
+     * correctly.
      */
     private void doLoadBlockListeners()
         throws Exception
@@ -323,7 +325,10 @@
             {
                 final String name = listeners[ i ].getTemplate().getName();
                 final String message =
-                    REZ.format( "bad-listener", "startup", name, e.getMessage() );
+                    REZ.format( "bad-listener",
+                                "startup",
+                                name,
+                                e.getMessage() );
                 getLogger().error( message, e );
                 throw e;
             }
@@ -338,10 +343,9 @@
     }
 
     /**
-     * Run a phase for application.
-     * Each phase transitions application into new state and processes
-     * all the blocks to make sure they are in that state aswell.
-     * Exceptions leave the blocks in an indeterminate state.
+     * Run a phase for application. Each phase transitions application into new
+     * state and processes all the blocks to make sure they are in that state
+     * aswell. Exceptions leave the blocks in an indeterminate state.
      *
      * @param name the name of phase (for logging purposes)
      * @throws Exception if an error occurs
@@ -350,8 +354,10 @@
         throws Exception
     {
         //Setup thread context for calling visitors
-        final ClassLoader loader = Thread.currentThread().getContextClassLoader();
-        Thread.currentThread().setContextClassLoader( m_context.getClassLoader() );
+        final ClassLoader loader = Thread.currentThread()
+            .getContextClassLoader();
+        Thread.currentThread().setContextClassLoader(
+            m_context.getClassLoader() );
 
         try
         {
@@ -364,9 +370,8 @@
     }
 
     /**
-     * Actually run applications phas.
-     * By this methods calling it is assumed that Thread Context
-     * has already been setup.
+     * Actually run applications phas. By this methods calling it is assumed
+     * that Thread Context has already been setup.
      *
      * @param name the name of phase (for logging purposes)
      * @throws Exception if an error occurs
@@ -376,7 +381,8 @@
     {
         final ComponentProfile[] blocks =
             getComponentsInPartition( ContainerConstants.BLOCK_PARTITION );
-        final String[] order = DependencyGraph.walkGraph( PHASE_STARTUP == name, blocks );
+        final String[] order = DependencyGraph.walkGraph(
+            PHASE_STARTUP == name, blocks );
 
         //Log message describing the number of blocks
         //the phase in and the order in which they will be
@@ -397,7 +403,8 @@
             final PartitionProfile partition = m_context.getPartitionProfile();
             final File homeDirectory = m_context.getHomeDirectory();
             final SarMetaData sarMetaData =
-                ComponentMetaDataConverter.toSarMetaData( partition, homeDirectory );
+                ComponentMetaDataConverter.toSarMetaData( partition,
+                                                          homeDirectory );
             m_listenerSupport.fireApplicationStartingEvent( sarMetaData );
         }
         else
@@ -415,7 +422,9 @@
             //Log message saying we are processing block
             if( getLogger().isDebugEnabled() )
             {
-                final String message = REZ.format( "process-block", block, name );
+                final String message = REZ.format( "process-block",
+                                                   block,
+                                                   name );
                 getLogger().debug( message );
             }
 
@@ -434,7 +443,10 @@
             catch( final Exception e )
             {
                 final String message =
-                    REZ.format( "app.error.run-phase", name, block, e.getMessage() );
+                    REZ.format( "app.error.run-phase",
+                                name,
+                                block,
+                                e.getMessage() );
                 getLogger().error( message, e );
                 m_listenerSupport.applicationFailure( e );
                 throw e;
@@ -443,7 +455,9 @@
             //Log message saying we have processed block
             if( getLogger().isDebugEnabled() )
             {
-                final String message = REZ.format( "processed-block", block, name );
+                final String message = REZ.format( "processed-block",
+                                                   block,
+                                                   name );
                 getLogger().debug( message );
             }
         }
@@ -462,16 +476,16 @@
     }
 
     /**
-     * Method to run a Block through it's startup phase.
-     * This will involve notification of {@link ApplicationListener}
-     * objects, creation of the Block/Block Proxy object, calling the startup
-     * Avalon Lifecycle methods and updating State property of BlockEntry.
-     * Errors that occur during shutdown will be logged appropriately and
-     * cause exceptions with useful messages to be raised.
+     * Method to run a Block through it's startup phase. This will involve
+     * notification of {@link ApplicationListener} objects, creation of the
+     * Block/Block Proxy object, calling the startup Avalon Lifecycle methods
+     * and updating State property of BlockEntry. Errors that occur during
+     * shutdown will be logged appropriately and cause exceptions with useful
+     * messages to be raised.
      *
      * @param entry the entry containing Block
-     * @throws Exception if an error occurs when block passes
-     *            through a specific lifecycle stage
+     * @throws Exception if an error occurs when block passes through a specific
+     * lifecycle stage
      */
     private void startup( final BlockEntry entry )
         throws Exception
@@ -488,11 +502,11 @@
     }
 
     /**
-     * Method to run a Block through it's shutdown phase.
-     * This will involve notification of {@link ApplicationListener}
-     * objects, invalidating the proxy object, calling the shutdown
-     * Avalon Lifecycle methods and updating State property of BlockEntry.
-     * Errors that occur during shutdown will be logged appropraitely.
+     * Method to run a Block through it's shutdown phase. This will involve
+     * notification of {@link ApplicationListener} objects, invalidating the
+     * proxy object, calling the shutdown Avalon Lifecycle methods and updating
+     * State property of BlockEntry. Errors that occur during shutdown will be
+     * logged appropraitely.
      *
      * @param entry the entry containing Block
      */
@@ -528,8 +542,8 @@
      * object if appropriate.
      *
      * @param profile the BlockListenerMetaData
-     * @throws Exception if an error occurs when listener passes
-     *            through a specific lifecycle stage
+     * @throws Exception if an error occurs when listener passes through a
+     * specific lifecycle stage
      */
     private void startupListener( final ComponentProfile profile )
         throws Exception
@@ -543,7 +557,8 @@
         // However onky ApplicationListners can avail of block events.
         if( listener instanceof ApplicationListener )
         {
-            m_listenerSupport.addApplicationListener( (ApplicationListener)listener );
+            m_listenerSupport.addApplicationListener(
+                (ApplicationListener)listener );
         }
         else
         {

Index: DefaultBlockContext.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/application/DefaultBlockContext.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- DefaultBlockContext.java	3 Nov 2003 05:55:14 -0000	1.3
+++ DefaultBlockContext.java	29 Nov 2003 13:44:15 -0000	1.4
@@ -96,7 +96,7 @@
 /**
  * Context via which Blocks communicate with container.
  *
- * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
+ * @author Peter Donald
  */
 final class DefaultBlockContext
     implements BlockContext
@@ -116,7 +116,9 @@
     {
         if( BlockContext.APP_NAME.equals( key ) )
         {
-            return m_applicationContext.getPartitionProfile().getMetaData().getName();
+            return m_applicationContext.getPartitionProfile()
+                .getMetaData()
+                .getName();
         }
         else if( BlockContext.APP_HOME_DIR.equals( key ) )
         {
@@ -166,7 +168,8 @@
     {
         try
         {
-            return m_applicationContext.getLogger( getName() ).getChildLogger( name );
+            return m_applicationContext.getLogger( getName() ).getChildLogger(
+                name );
         }
         catch( Exception e )
         {

Index: DependencyGraph.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/application/DependencyGraph.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- DependencyGraph.java	3 Nov 2003 06:43:15 -0000	1.5
+++ DependencyGraph.java	29 Nov 2003 13:44:15 -0000	1.6
@@ -92,9 +92,7 @@
 import org.jcontainer.loom.components.util.profile.ComponentProfile;
 
 /**
- *
- *
- * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
+ * @author Peter Donald
  */
 class DependencyGraph
 {
@@ -104,11 +102,11 @@
     }
 
     /**
-     * Method to generate an ordering of nodes to traverse.
-     * It is expected that the specified Blocks have passed
-     * verification tests and are well formed.
+     * Method to generate an ordering of nodes to traverse. It is expected that
+     * the specified Blocks have passed verification tests and are well formed.
      *
-     * @param forward true if forward dependencys traced, false if dependencies reversed
+     * @param forward true if forward dependencys traced, false if dependencies
+     * reversed
      * @param blocks the blocks to traverse
      * @return the ordered node names
      */
@@ -165,23 +163,26 @@
                                            final ArrayList done,
                                            final ArrayList order )
     {
-        final DependencyDescriptor[] descriptors = block.getInfo().getDependencies();
+        final DependencyDescriptor[] descriptors = block.getInfo()
+            .getDependencies();
         for( int i = 0; i < descriptors.length; i++ )
         {
             final String key = descriptors[ i ].getKey();
-            final DependencyDirective[] dependencySet = block.getTemplate().getDependencies( key );
+            final DependencyDirective[] dependencySet = block.getTemplate()
+                .getDependencies( key );
             for( int j = 0; j < dependencySet.length; j++ )
             {
                 final DependencyDirective dependency = dependencySet[ j ];
-                final ComponentProfile other = getBlock( dependency.getProviderName(), blocks );
+                final ComponentProfile other = getBlock(
+                    dependency.getProviderName(), blocks );
                 visitBlock( other, blocks, true, done, order );
             }
         }
     }
 
     /**
-     * Traverse all reverse dependencies of specified block.
-     * A reverse dependency are those that dependend on block.
+     * Traverse all reverse dependencies of specified block. A reverse
+     * dependency are those that dependend on block.
      *
      * @param block the ComponentProfile
      */
@@ -195,7 +196,8 @@
         for( int i = 0; i < blocks.length; i++ )
         {
             final ComponentProfile other = blocks[ i ];
-            final DependencyDirective[] roles = other.getTemplate().getDependencies();
+            final DependencyDirective[] roles = other.getTemplate()
+                .getDependencies();
 
             for( int j = 0; j < roles.length; j++ )
             {

Index: ListenerSupport.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/application/ListenerSupport.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ListenerSupport.java	3 Nov 2003 06:43:15 -0000	1.5
+++ ListenerSupport.java	29 Nov 2003 13:44:15 -0000	1.6
@@ -93,14 +93,13 @@
 import org.apache.avalon.phoenix.metadata.SarMetaData;
 import org.apache.avalon.phoenix.metainfo.BlockInfo;
 import org.jcontainer.loom.components.util.ComponentInfoConverter;
-import org.jcontainer.loom.components.util.profile.ComponentProfile;
 
 /**
- * Manage a set of {@link ApplicationListener} objects and propogate
- * {@link ApplicationEvent} notifications to these listeners.  Not all
- * events pass an Applicationevent parameter.
+ * Manage a set of {@link ApplicationListener} objects and propogate {@link
+ * ApplicationEvent} notifications to these listeners.  Not all events pass an
+ * Applicationevent parameter.
  *
- * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
+ * @author Peter Donald
  * @author <a href="mailto:Paul_Hammant-/[email protected]">Paul Hammant</a>
  */
 final class ListenerSupport
@@ -112,8 +111,8 @@
     private ApplicationListener[] m_listeners = new ApplicationListener[ 0 ];
 
     /**
-     * fire Event indicating that the Application represented
-     * by specified metaData is starting.
+     * fire Event indicating that the Application represented by specified
+     * metaData is starting.
      *
      * @param metaData the metaData
      */
@@ -126,8 +125,8 @@
     }
 
     /**
-     * fire Event indicating that Block represented by
-     * specific entry has been added.
+     * fire Event indicating that Block represented by specific entry has been
+     * added.
      *
      * @param entry the entry
      */
@@ -137,8 +136,8 @@
     }
 
     /**
-     * fire Event indicating that Block represented by
-     * specific entry is being removed.
+     * fire Event indicating that Block represented by specific entry is being
+     * removed.
      *
      * @param entry the entry
      */
@@ -148,42 +147,44 @@
     }
 
     /**
-     * Utility method to create an event for a
-     * specific entry.
+     * Utility method to create an event for a specific entry.
      *
      * @param entry the entry
      * @return the new event
      */
     private BlockEvent createEvent( final BlockEntry entry )
     {
-        final BlockInfo blockInfo = 
+        final BlockInfo blockInfo =
             ComponentInfoConverter.toBlockInfo( entry.getInfo() );
         return new BlockEvent( entry.getName(),
-                            entry.getProxy(),
-                            blockInfo );
+                               entry.getProxy(),
+                               blockInfo );
     }
 
     /**
-     * Add a ApplicationListener to those requiring notification of
-     * {@link ApplicationEvent}s.
+     * Add a ApplicationListener to those requiring notification of {@link
+     * ApplicationEvent}s.
      *
      * @param listener the ApplicationListener
      */
-    public synchronized void addApplicationListener( final ApplicationListener listener )
+    public synchronized void addApplicationListener(
+        final ApplicationListener listener )
     {
-        final ApplicationListener[] listeners = new ApplicationListener[ 1 + m_listeners.length ];
+        final ApplicationListener[] listeners = new ApplicationListener[ 1 +
+            m_listeners.length ];
         System.arraycopy( m_listeners, 0, listeners, 0, m_listeners.length );
         listeners[ m_listeners.length ] = listener;
         m_listeners = listeners;
     }
 
     /**
-     * Remove a ApplicationListener from those requiring notification of
-     * {@link ApplicationEvent}s.
+     * Remove a ApplicationListener from those requiring notification of {@link
+     * ApplicationEvent}s.
      *
      * @param listener the ApplicationListener
      */
-    public synchronized void removeApplicationListener( final ApplicationListener listener )
+    public synchronized void removeApplicationListener(
+        final ApplicationListener listener )
     {
         int index = 0;
         while( index < m_listeners.length )
@@ -201,27 +202,36 @@
                 new ApplicationListener[ m_listeners.length - 1 ];
             System.arraycopy( m_listeners, 0, listeners, 0, index );
             final int length = m_listeners.length - index - 1;
-            System.arraycopy( m_listeners, index + 1, listeners, index, length );
+            System.arraycopy( m_listeners,
+                              index + 1,
+                              listeners,
+                              index,
+                              length );
         }
     }
 
     /**
-     * Add a BlockListener to those requiring notification of
-     * {@link BlockEvent}s.
+     * Add a BlockListener to those requiring notification of {@link
+     * BlockEvent}s.
      *
      * @param listener the BlockListener
      */
     public synchronized void addBlockListener( final BlockListener listener )
     {
-        final BlockListener[] listeners = new BlockListener[ 1 + m_blockListeners.length ];
-        System.arraycopy( m_blockListeners, 0, listeners, 0, m_blockListeners.length );
+        final BlockListener[] listeners = new BlockListener[ 1 +
+            m_blockListeners.length ];
+        System.arraycopy( m_blockListeners,
+                          0,
+                          listeners,
+                          0,
+                          m_blockListeners.length );
         listeners[ m_listeners.length ] = listener;
         m_blockListeners = listeners;
     }
 
     /**
-     * Remove a BlockListener from those requiring notification of
-     * {@link BlockEvent}s.
+     * Remove a BlockListener from those requiring notification of {@link
+     * BlockEvent}s.
      *
      * @param listener the BlockListener
      */
@@ -243,7 +253,11 @@
                 new BlockListener[ m_blockListeners.length - 1 ];
             System.arraycopy( m_blockListeners, 0, listeners, 0, index );
             final int length = m_blockListeners.length - index - 1;
-            System.arraycopy( m_blockListeners, index + 1, listeners, index, length );
+            System.arraycopy( m_blockListeners,
+                              index + 1,
+                              listeners,
+                              index,
+                              length );
         }
     }
 
@@ -252,7 +266,8 @@
      *
      * @param event the ApplicationEvent
      */
-    private synchronized void applicationStarting( final ApplicationEvent event )
+    private synchronized void applicationStarting(
+        final ApplicationEvent event )
         throws Exception
     {
         for( int i = 0; i < m_listeners.length; i++ )
@@ -263,7 +278,6 @@
 
     /**
      * Notification that the application has started.
-     *
      */
     public synchronized void applicationStarted()
     {
@@ -275,7 +289,6 @@
 
     /**
      * Notification that the application is stopping
-     *
      */
     public synchronized void applicationStopping()
     {
@@ -287,7 +300,6 @@
 
     /**
      * Notification that the application has stopped
-     *
      */
     public synchronized void applicationStopped()
     {
@@ -299,9 +311,9 @@
 
     /**
      * Notification that the application has failed
-     *
      */
-    public synchronized void applicationFailure( final Exception causeOfFailure )
+    public synchronized void applicationFailure(
+        final Exception causeOfFailure )
     {
         for( int i = 0; i < m_listeners.length; i++ )
         {
@@ -310,8 +322,7 @@
     }
 
     /**
-     * Notification that a block has just been added
-     * to Server Application.
+     * Notification that a block has just been added to Server Application.
      *
      * @param event the BlockEvent
      */
@@ -330,8 +341,8 @@
     }
 
     /**
-     * Notification that a block is just about to be
-     * removed from Server Application.
+     * Notification that a block is just about to be removed from Server
+     * Application.
      *
      * @param event the BlockEvent
      */