crafterm 2002/07/15 10:35:22
Modified: fortress/src/java/org/apache/excalibur/fortress/handler
ComponentFactory.java
fortress/src/java/org/apache/excalibur/fortress/lifecycle
LifecycleExtensionManager.java
fortress/src/java/org/apache/excalibur/fortress/lookup
FortressServiceManager.java
FortressServiceSelector.java
Log:
Fixed bug I inadvertently introduced with previous commit. We still require
4 methods for executing the different types of extensions within the
ComponentFactory/Manager classes.
Revision Changes Path
1.18 +3 -3
jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ComponentFactory.java
Index: ComponentFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/handler/ComponentFactory.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ComponentFactory.java 15 Jul 2002 16:18:38 -0000 1.17
+++ ComponentFactory.java 15 Jul 2002 17:35:22 -0000 1.18
@@ -133,7 +133,7 @@
ContainerUtil.parameterize( component, parameters );
}
- m_extManager.executeExtensions( component, m_context );
+ m_extManager.executeCreationExtensions( component, m_context );
ContainerUtil.initialize( component );
ContainerUtil.start( component );
@@ -164,7 +164,7 @@
{
ContainerUtil.shutdown( component );
- m_extManager.executeExtensions( component, m_context );
+ m_extManager.executeDestructionExtensions( component, m_context );
if( m_dispose.isActive() )
{
1.3 +52 -10
jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lifecycle/LifecycleExtensionManager.java
Index: LifecycleExtensionManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lifecycle/LifecycleExtensionManager.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LifecycleExtensionManager.java 15 Jul 2002 16:18:38 -0000 1.2
+++ LifecycleExtensionManager.java 15 Jul 2002 17:35:22 -0000 1.3
@@ -1,10 +1,10 @@
/*
-* Copyright (C) The Apache Software Foundation. All rights reserved.
-*
-* This software is published under the terms of the Apache Software License
-* version 1.1, a copy of which has been included with this distribution in
-* the LICENSE.txt file.
-*/
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
+ *
+ * This software is published under the terms of the Apache Software License
+ * version 1.1, a copy of which has been included with this distribution in
+ * the LICENSE.txt file.
+ */
package org.apache.excalibur.fortress.lifecycle;
import java.util.ArrayList;
@@ -41,17 +41,59 @@
private final List m_extensions = new ArrayList();
/**
- * <code>executeExtensions</code> method, executes all extensions on the
- * given component.
+ * <code>executeAccessExtensions</code> method, executes all access level
+ * extensions on the given component.
*
* @param component a <code>Component</code> instance
* @param context a <code>Context</code> instance
* @exception Exception if an error occurs
*/
- public void executeExtensions( Object component, Context context )
+ public void executeAccessExtensions( Object component, Context context )
throws Exception
{
executeExtensions( m_extensions.toArray(), component, context, ACCESS );
+ }
+
+ /**
+ * <code>executeReleaseExtensions</code> method, executes all release level
+ * extensions on the given component.
+ *
+ * @param component a <code>Component</code> instance
+ * @param context a <code>Context</code> instance
+ * @exception Exception if an error occurs
+ */
+ public void executeReleaseExtensions( Object component, Context context )
+ throws Exception
+ {
+ executeExtensions( m_extensions.toArray(), component, context, RELEASE );
+ }
+
+ /**
+ * <code>executeCreationExtensions</code> method, executes all creation level
+ * extensions on the given component.
+ *
+ * @param component a <code>Component</code> instance
+ * @param context a <code>Context</code> instance
+ * @exception Exception if an error occurs
+ */
+ public void executeCreationExtensions( Object component, Context context )
+ throws Exception
+ {
+ executeExtensions( m_extensions.toArray(), component, context, CREATION );
+ }
+
+ /**
+ * <code>executeDestructionExtensions</code> method, executes all destruction
+ * level extensions on the given component.
+ *
+ * @param component a <code>Component</code> instance
+ * @param context a <code>Context</code> instance
+ * @exception Exception if an error occurs
+ */
+ public void executeDestructionExtensions( Object component, Context context )
+ throws Exception
+ {
+ executeExtensions( m_extensions.toArray(), component, context, DESTRUCTION
);
}
// The following methods define operations that modify the internal list
1.6 +3 -3
jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceManager.java
Index: FortressServiceManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceManager.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FortressServiceManager.java 15 Jul 2002 16:18:38 -0000 1.5
+++ FortressServiceManager.java 15 Jul 2002 17:35:22 -0000 1.6
@@ -119,7 +119,7 @@
component = handler.get();
- m_extManager.executeExtensions( component, m_context );
+ m_extManager.executeAccessExtensions( component, m_context );
}
catch( ServiceException ce )
{
@@ -153,7 +153,7 @@
try
{
- m_extManager.executeExtensions( component, m_context );
+ m_extManager.executeReleaseExtensions( component, m_context );
}
catch ( Exception e )
{
1.5 +3 -3
jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceSelector.java
Index: FortressServiceSelector.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceSelector.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- FortressServiceSelector.java 15 Jul 2002 16:18:38 -0000 1.4
+++ FortressServiceSelector.java 15 Jul 2002 17:35:22 -0000 1.5
@@ -66,7 +66,7 @@
component = handler.get();
- m_extManager.executeExtensions( component, m_context );
+ m_extManager.executeAccessExtensions( component, m_context );
}
catch( ServiceException ce )
{
@@ -93,7 +93,7 @@
try
{
- m_extManager.executeExtensions( component, m_context );
+ m_extManager.executeReleaseExtensions( component, m_context );
}
catch ( Exception e )
{
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>