mcconnell 2002/07/04 12:49:27 Modified: assembly/src/java/org/apache/excalibur/merlin/kernel DefaultContainer.java Log: updated of the ordering of local component start/stop and sub-container startup and shutdown sequence to ensure components with cross-container dependecies are properly managed. Revision Changes Path 1.5 +18 -6 jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/kernel/DefaultContainer.java Index: DefaultContainer.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/src/java/org/apache/excalibur/merlin/kernel/DefaultContainer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- DefaultContainer.java 4 Jul 2002 09:01:35 -0000 1.4 +++ DefaultContainer.java 4 Jul 2002 19:49:27 -0000 1.5 @@ -189,6 +189,12 @@ public void startup() throws Exception { + + // + // startup all of the components in this container + // before starting up any of the nested containers + // + ComponentMetaData[] startup = m_map.getStartupGraph(); getLogger().debug("startup"); for( int i=0; i<startup.length; i++ ) @@ -204,16 +210,22 @@ public void shutdown() { + + // + // shutdown all of the nested containers before stopping + // the components in this container + // + getLogger().debug("shutdown"); - ComponentMetaData[] shutdown = m_map.getShutdownGraph(); - for( int i=0; i<shutdown.length; i++ ) - { - getLogger().debug("stop: " + shutdown[i].getName() ); - } Iterator iterator = m_containers.iterator(); while( iterator.hasNext() ) { ((Container)iterator.next()).shutdown(); + } + ComponentMetaData[] shutdown = m_map.getShutdownGraph(); + for( int i=0; i<shutdown.length; i++ ) + { + getLogger().debug("stop: " + shutdown[i].getName() ); } }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>