donaldp 2002/11/06 22:37:53
Modified: component/src/java/org/apache/avalon/excalibur/component
ComponentHandler.java DefaultComponentFactory.java
ExcaliburComponentManager.java
ExcaliburComponentManagerCreator.java
ExcaliburComponentSelector.java
component/src/java/org/apache/avalon/excalibur/component/servlet
AbstractComponentManagerServlet.java
AbstractReferenceProxyLatch.java
ExcaliburComponentManagerServlet.java
Log:
Fix up bugs introduced by *&^*&^$ piece of &^%&^%$ IDEA formatter ;)
Revision Changes Path
1.9 +3 -4
jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ComponentHandler.java
Index: ComponentHandler.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ComponentHandler.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ComponentHandler.java 7 Nov 2002 05:11:34 -0000 1.8
+++ ComponentHandler.java 7 Nov 2002 06:37:53 -0000 1.9
@@ -18,7 +18,6 @@
import org.apache.avalon.framework.thread.ThreadSafe;
import org.apache.excalibur.instrument.CounterInstrument;
import org.apache.excalibur.instrument.InstrumentManager;
-import org.apache.excalibur.instrument.Instrumentable;
import org.apache.excalibur.instrument.ValueInstrument;
/**
@@ -168,7 +167,7 @@
}
// Set the instrumentable name of the handler.
- ( (Instrumentable)handler ).setInstrumentableName(
+ handler.setInstrumentableName(
ExcaliburComponentManager.INSTRUMENTABLE_NAME + "." +
instrumentableName );
return handler;
@@ -271,7 +270,7 @@
{
m_references--;
}
-t manager
+
m_putsInstrument.increment();
m_referencesInstrument.setValue( m_references );
1.11 +11 -8
jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/DefaultComponentFactory.java
Index: DefaultComponentFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/DefaultComponentFactory.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- DefaultComponentFactory.java 7 Nov 2002 05:11:34 -0000 1.10
+++ DefaultComponentFactory.java 7 Nov 2002 06:37:53 -0000 1.11
@@ -122,7 +122,7 @@
null,
"N/A" );
}
-
+
/**
* Construct a new component factory for the specified component.
*
@@ -159,7 +159,7 @@
m_instrumentableName = instrumentableName;
m_proxyGenerator = new ComponentProxyGenerator(
m_componentClass.getClassLoader() );
}
-
+
/*---------------------------------------------------------------
* ObjectFactory Methods
*-------------------------------------------------------------*/
@@ -216,7 +216,8 @@
( (Loggable)component ).setLogger(
m_loggerManager.getLogKitLoggerForCategory( logger ) );
}
}
-
+ }
+
// Set the name of the instrumentable before initialization.
if( component instanceof Instrumentable )
{
@@ -318,7 +319,9 @@
return m_componentClass;
}
- public final void decommission( final Object component )
+ public final void decommission
+ (
+ final Object component )
throws Exception
{
Object check = m_components.get( component );
@@ -367,7 +370,8 @@
/*---------------------------------------------------------------
* Disposable Methods
*-------------------------------------------------------------*/
- public final void dispose()
+ public final void dispose
+ ()
{
Component[] components = new Component[ m_components.keySet().size() ];
@@ -394,8 +398,7 @@
* ThreadSafe Methods
*-------------------------------------------------------------*/
// No methods
-ethods
-
+
/*---------------------------------------------------------------
* Methods
*-------------------------------------------------------------*/
1.19 +8 -8
jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentManager.java
Index: ExcaliburComponentManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentManager.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- ExcaliburComponentManager.java 7 Nov 2002 05:11:34 -0000 1.18
+++ ExcaliburComponentManager.java 7 Nov 2002 06:37:53 -0000 1.19
@@ -55,8 +55,8 @@
/** Instrumentable name used to represent the component-manager.
* Handlers reference this name to register themselves at the correct
* location under the ECM. */
- public static final String INSTRUMENTABLE_NAME = "component-manager";
-
+ public static final String INSTRUMENTABLE_NAME = "component-manager";
+
/** The parent ComponentLocator */
private final ComponentManager m_parentManager;
@@ -300,7 +300,7 @@
return component;
}
-
+
/**
* Tests for existence of a component. Please note that this test is for
* <strong>existing</strong> components, and a component will not be created
@@ -470,7 +470,7 @@
}
}
}
-
+
/*---------------------------------------------------------------
* Contextual
/*---------------------------------------------------------------
@@ -648,7 +648,7 @@
m_logkit = new LogkitLoggerManager( null, logkit );
}
}
--------------------------------------------------------------*/
+/*-------------------------------------------------------------*/
/**
* Sets the InstrumentManager for child components. Can be for special
* purpose components, however it is used mostly internally.
@@ -721,7 +721,7 @@
// Child instrumentables register themselves as they are discovered.
return EMPTY_INSTRUMENTABLE_ARRAY;
}
-
+
/*---------------------------------------------------------------
* Methods
*-------------------------------------------------------------*/
@@ -774,7 +774,7 @@
// element is used.
String instrumentableName =
configuration.getAttribute( "instrumentable", configuration.getName() );
-
+
return ComponentHandler.getComponentHandler( role,
componentClass,
configuration,
1.6 +9 -11
jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentManagerCreator.java
Index: ExcaliburComponentManagerCreator.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentManagerCreator.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ExcaliburComponentManagerCreator.java 7 Nov 2002 05:11:34 -0000 1.5
+++ ExcaliburComponentManagerCreator.java 7 Nov 2002 06:37:53 -0000 1.6
@@ -63,25 +63,25 @@
/** Internal logger set once the LoggerManager has been initialized.
* Always call getLogger() to get the best available logger. */
private Logger m_logger;
-
+
/** Simple logger which can be used until the LoggerManager has been setup.
* Always call getLogger() to get the best available logger. */
private final Logger m_primordialLogger;
-
+
/** Context to create the ComponentManager with. */
private Context m_context;
-
+
/** Internal logger manager. */
private LoggerManager m_loggerManager;
-
+
/** Internal role manager. */
private RoleManager m_roleManager;
-
+
/** Internal component manager. */
private ComponentManager m_componentManager;
-
+
/** Internal instrument manager. */
- private InstrumentManag
+ private InstrumentManager m_instrumentManager;
/*---------------------------------------------------------------
* Static Methods
*-------------------------------------------------------------*/
@@ -122,7 +122,7 @@
/**
* Creates a Configuration object from data read from an InputStream.
*
- * @param is InputStream from which the Configuration is created.
+ * @param file InputStream from which the Configuration is created.
*
* @return Configuration created from the InputStream
*
@@ -439,8 +439,6 @@
Logger imLogger = m_loggerManager.getLoggerForCategory(
instrumentManagerConfig.getAttribute( "logger", "system.instrument"
) );
- instrumentManagerConfig.getAttribute( "logger", "system.instrument"
) );
-
// Set up the Instrument Manager
DefaultInstrumentManager instrumentManager = new
DefaultInstrumentManager();
instrumentManager.enableLogging( imLogger );
1.17 +3 -3
jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentSelector.java
Index: ExcaliburComponentSelector.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentSelector.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- ExcaliburComponentSelector.java 7 Nov 2002 05:11:34 -0000 1.16
+++ ExcaliburComponentSelector.java 7 Nov 2002 06:37:53 -0000 1.17
@@ -421,8 +421,8 @@
try
{
handler.initialize();
-
- ly register the handler so that it will be located under the
+
+ //ly register the handler so that it will be located under the
// instrument manager, seperate from the actual instrumentable
data of the
// components
if ( ( m_instrumentManager != null ) &&
1.5 +9 -12
jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/servlet/AbstractComponentManagerServlet.java
Index: AbstractComponentManagerServlet.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/servlet/AbstractComponentManagerServlet.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AbstractComponentManagerServlet.java 7 Nov 2002 05:11:35 -0000 1.4
+++ AbstractComponentManagerServlet.java 7 Nov 2002 06:37:53 -0000 1.5
@@ -40,7 +40,7 @@
private String m_referenceName;
private ComponentManager m_componentManager;
private Logger m_logger;
-
+
/** Instrumentable Name assigned to this Instrumentable */
private String m_instrumentableName;
@@ -52,12 +52,13 @@
/** Flag which is to used to keep track of when the Instrumentable has been
registered. */
private boolean m_registered;
-
+
/** Counts the number of times the service is requested. */
private CounterInstrument m_instrumentRequests;
-
+
/** Records the amount of time execute takes to be processed. */
- private ValueInstrument m_inst
+ private ValueInstrument m_instrumentTime;
+
/*---------------------------------------------------------------
* Constructors
*-------------------------------------------------------------*/
@@ -299,11 +300,7 @@
return instruments;
}
}
-rray( instruments );
- return instruments;
- }
- }
-
+
/*---------------------------------------------------------------
* Methods
*-------------------------------------------------------------*/
@@ -343,7 +340,7 @@
}
m_childList.add( child );
}
-
+
/**
* Obtain a reference to the servlet's logger.
*
@@ -353,7 +350,7 @@
{
return m_logger;
}
-
+
/**
* Returns the current ComponentManager.
*
1.4 +9 -10
jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/servlet/AbstractReferenceProxyLatch.java
Index: AbstractReferenceProxyLatch.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/servlet/AbstractReferenceProxyLatch.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AbstractReferenceProxyLatch.java 7 Nov 2002 05:11:35 -0000 1.3
+++ AbstractReferenceProxyLatch.java 7 Nov 2002 06:37:53 -0000 1.4
@@ -34,12 +34,13 @@
{
/** Name of the latch */
private String m_name;
-
+
/** Number of registered proxies which have not yet been finalized. */
private int m_waitingProxies;
-
+
/** Flag that keeps track of when the trigger is requested. */
- private boolean m_triggerReq
+ private boolean m_triggerRequested;
+
/*---------------------------------------------------------------
* Constructors
*-------------------------------------------------------------*/
@@ -155,7 +156,7 @@
/**
* Called by a proxy when it is finalized.
*
- * @proxy proxy The AbstractRefernceProxy that is ready.
+ * @param proxy The AbstractRefernceProxy that is ready.
*/
void notifyFinalized( AbstractReferenceProxy proxy )
{
@@ -174,16 +175,14 @@
return;
}
}
-}
- }
-
+
// Do this outside the synchronization block.
if ( getLogger().isDebugEnabled() )
{
getLogger().debug( "The proxy named '" + proxy.getName() + "' was
finalized. "
+ "All proxies have been finalized." );
}
-
+
if ( m_triggerRequested )
{
try
@@ -196,7 +195,7 @@
}
}
}
-
+
/**
* Called when all of the proxies have notified that they are done.
*/
1.5 +5 -4
jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/servlet/ExcaliburComponentManagerServlet.java
Index: ExcaliburComponentManagerServlet.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/servlet/ExcaliburComponentManagerServlet.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ExcaliburComponentManagerServlet.java 7 Nov 2002 05:11:35 -0000 1.4
+++ ExcaliburComponentManagerServlet.java 7 Nov 2002 06:37:53 -0000 1.5
@@ -129,9 +129,10 @@
extends GenericServlet
{
private ExcaliburComponentManagerCreator m_componentManagerCreator;
-
+
/** Latch used to shutdown the ExcaliburComponentManagerCreator cleanly. */
- private Latch m_lat
+ private Latch m_latch;
+
/*---------------------------------------------------------------
* Constructors
*-------------------------------------------------------------*/
@@ -351,7 +352,7 @@
{
m_componentManagerCreator = componentManagerCreator;
}
-
+
/*---------------------------------------------------------------
* AbstractReferenceProxyLatch Methods
*-------------------------------------------------------------*/
--
To unsubscribe, e-mail: <mailto:avalon-cvs-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@;jakarta.apache.org>