You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by le...@apache.org on 2003/05/17 22:16:59 UTC
cvs commit: avalon-excalibur/instrument-manager/src/java/org/apache/excalibur/instrument/manager DefaultInstrumentManager.java
leif 2003/05/17 13:16:59
Modified: instrument-manager/src/java/org/apache/excalibur/instrument/manager
DefaultInstrumentManager.java
Log:
Add an optional attribute to connector definitons so that if they fail to be
configured the user can control whether that should affect whether or not the
entire InstrumentManager fails to be configured. By default it does not. This
was done to prevent a bind failure by the Altrmi connector from causing an
entire application to fail to startup.
Revision Changes Path
1.7 +14 -3 avalon-excalibur/instrument-manager/src/java/org/apache/excalibur/instrument/manager/DefaultInstrumentManager.java
Index: DefaultInstrumentManager.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/instrument-manager/src/java/org/apache/excalibur/instrument/manager/DefaultInstrumentManager.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DefaultInstrumentManager.java 5 Apr 2003 19:39:36 -0000 1.6
+++ DefaultInstrumentManager.java 17 May 2003 20:16:59 -0000 1.7
@@ -226,6 +226,8 @@
// Handle aliases
if ( className.equals( "altrmi" ) )
{
+ // Don't use InstrumentManagerAltrmiConnector.class.getName() because
+ // the class is optional for the build.
className = "org.apache.excalibur.instrument.manager.altrmi."
+ "InstrumentManagerAltrmiConnector";
}
@@ -247,8 +249,17 @@
}
catch ( Exception e )
{
- throw new ConfigurationException( "Unable to create connector because: "
- + e );
+ String msg = "Unable to create connector because: " + e;
+
+ // Was the optional flag set?
+ if ( connectorConf.getAttributeAsBoolean( "optional", true ) )
+ {
+ getLogger().warn( msg );
+ }
+ else
+ {
+ throw new ConfigurationException( msg );
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org