bloritsch 2003/02/10 06:52:27
Modified: fortress/src/java/org/apache/avalon/fortress/util
ContextManager.java
Log:
more cleanup and logging points
Revision Changes Path
1.5 +10 -10
avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextManager.java
Index: ContextManager.java
===================================================================
RCS file:
/home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/ContextManager.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ContextManager.java 10 Feb 2003 14:48:10 -0000 1.4
+++ ContextManager.java 10 Feb 2003 14:52:27 -0000 1.5
@@ -268,7 +268,7 @@
}
catch( ContextException cex )
{
- m_logger.debug("Could not initialize the Configuration", ce);
+ getLogger().debug("Could not initialize the Configuration", ce);
// Guess there is none.
return;
}
@@ -295,7 +295,7 @@
}
catch( ContextException ce )
{
- m_logger.debug("Could not copy the parameters for the Context, ignoring
the exception.", ce);
+ getLogger().debug("Could not copy the parameters for the Context,
ignoring the exception.", ce);
}
}
@@ -542,7 +542,7 @@
}
catch( ContextException ce )
{
- m_logger.debug( "Could not copy context entry: " + RoleManager.ROLE +
+ getLogger().debug( "Could not copy context entry: " + RoleManager.ROLE +
". Ignoring exception.", ce );
}
@@ -561,7 +561,7 @@
}
catch( ContextException ce )
{
- m_logger.debug("Could not initialize the RoleManager", ce);
+ getLogger().debug("Could not initialize the RoleManager", ce);
// No RoleManager available anywhere.
roleConfig = EMPTY_CONFIG;
}
@@ -578,12 +578,12 @@
ClassLoader classLoader = (ClassLoader)m_containerManagerContext.get(
ClassLoader.class.getName() );
// Create a parent role m_manager with all the default roles
- org.apache.avalon.fortress.impl.role.FortressRoleManager erm = new
org.apache.avalon.fortress.impl.role.FortressRoleManager( null, classLoader );
+ FortressRoleManager erm = new FortressRoleManager( null, classLoader );
erm.enableLogging( rmLogger.getChildLogger( "defaults" ) );
erm.initialize();
// Create a role m_manager with the configured roles
- org.apache.avalon.fortress.impl.role.ConfigurableRoleManager rm = new
org.apache.avalon.fortress.impl.role.ConfigurableRoleManager( erm, classLoader );
+ ConfigurableRoleManager rm = new ConfigurableRoleManager( erm, classLoader
);
rm.enableLogging( rmLogger );
rm.configure( roleConfig );
@@ -638,6 +638,7 @@
}
catch( ContextException ce )
{
+ getLogger().debug("There is no Configuration already loaded", ce);
}
String configUri = null;
@@ -647,6 +648,7 @@
}
catch( ContextException ce )
{
+ getLogger().debug("There isn't any configuration URI already specified
either.", ce);
return null;
}
@@ -665,10 +667,8 @@
}
catch( Exception e )
{
- if( getLogger().isWarnEnabled() )
- {
- getLogger().warn( "Could not read configuration file: " +
configUri, e );
- }
+ getLogger().warn( "Could not read configuration file: " + configUri, e
);
+
return null;
}
finally
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]