bloritsch 02/02/07 09:41:36
Modified: src/scratchpad/org/apache/avalon/excalibur/system
AbstractContainer.java
Log:
fix handlerKlass/klass mixups
Revision Changes Path
1.14 +30 -4
jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/system/AbstractContainer.java
Index: AbstractContainer.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/system/AbstractContainer.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- AbstractContainer.java 7 Feb 2002 16:55:33 -0000 1.13
+++ AbstractContainer.java 7 Feb 2002 17:41:35 -0000 1.14
@@ -36,7 +36,7 @@
* Manager can expose that to the instantiating class.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
- * @version CVS $Revision: 1.13 $ $Date: 2002/02/07 16:55:33 $
+ * @version CVS $Revision: 1.14 $ $Date: 2002/02/07 17:41:35 $
*/
public abstract class AbstractContainer
extends AbstractLogEnabled
@@ -133,7 +133,6 @@
try
{
klass = m_classLoader.loadClass( config.getAttribute(
"class" ) );
- handlerKlass = m_classLoader.loadClass(
config.getAttribute( "handler" ) );
}
catch ( Exception e )
{
@@ -145,11 +144,38 @@
continue;
}
+ try
+ {
+ handlerKlass = m_classLoader.loadClass(
config.getAttribute( "handler" ) );
+ }
+ catch ( Exception e )
+ {
+ if ( getLogger().isDebugEnabled() )
+ {
+ getLogger().debug( "ComponentHandler class '" +
config.getAttribute( "handler" ) +
+ "' is not valid.", e );
+ }
+ continue;
+ }
+
assignHandler( getHandler( handlerKlass, klass, config ),
config, managerMap );
}
else
{
- handleConfiguration( components[ i ], managerMap );
+ if ( getLogger().isDebugEnabled() )
+ {
+ getLogger().debug( "Attempting to process custom
configuration element: " + name );
+ }
+
+ try
+ {
+ handleConfiguration( components[ i ], managerMap );
+ }
+ catch ( Exception e )
+ {
+ getLogger().debug( "It appears that the configuration
element " +
+ components[ i ] + " was not a
Component" );
+ }
}
}
}
@@ -186,7 +212,7 @@
temp.makeReadOnly();
- assignHandler( getHandler( klass, handlerKlass, temp ), temp,
managerMap );
+ assignHandler( getHandler( handlerKlass, klass, temp ), temp,
managerMap );
}
/**
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>