You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by bl...@apache.org on 2003/03/07 14:14:22 UTC
cvs commit: avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util FortressConfig.java
bloritsch 2003/03/07 05:14:22
Modified: fortress/src/java/org/apache/avalon/fortress/impl
AbstractContainer.java DefaultContainerManager.java
fortress/src/java/org/apache/avalon/fortress/impl/handler
ComponentFactory.java LEAwareComponentHandler.java
fortress/src/java/org/apache/avalon/fortress/util
FortressConfig.java
Removed: fortress/src/java/org/apache/avalon/fortress/impl
LifecycleExtensionManager.java
Log:
fix some runtime issues and standardize on the LifecycleExtensionManager class
Revision Changes Path
1.11 +6 -5 avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/AbstractContainer.java
Index: AbstractContainer.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/AbstractContainer.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- AbstractContainer.java 25 Feb 2003 16:28:33 -0000 1.10
+++ AbstractContainer.java 7 Mar 2003 13:14:21 -0000 1.11
@@ -81,6 +81,7 @@
import org.apache.avalon.framework.service.Serviceable;
import org.apache.commons.collections.BoundedFifoBuffer;
import org.apache.commons.collections.StaticBucketMap;
+import org.apache.excalibur.container.lifecycle.LifecycleExtensionManager;
import org.apache.excalibur.event.Queue;
import org.apache.excalibur.instrument.InstrumentManager;
import org.apache.excalibur.instrument.Instrumentable;
@@ -122,7 +123,7 @@
/** contains the impl's InstrumentManager, which is extracted from m_serviceManager */
protected InstrumentManager m_instrumentManager;
/** contains the impl's LifecycleExtensionManager, which is extracted from m_serviceManager */
- protected org.apache.avalon.fortress.impl.LifecycleExtensionManager m_extManager;
+ protected LifecycleExtensionManager m_extManager;
/**
* Contains entries mapping roles to hint maps, where the hint map contains
* mappings from hints to ComponentHandlers.
@@ -178,14 +179,14 @@
// get optional services, or a default if the service isn't provided
- if( serviceManager.hasService( org.apache.avalon.fortress.impl.LifecycleExtensionManager.ROLE ) )
+ if( serviceManager.hasService( LifecycleExtensionManager.ROLE ) )
{
m_extManager =
- (org.apache.avalon.fortress.impl.LifecycleExtensionManager)serviceManager.lookup( org.apache.avalon.fortress.impl.LifecycleExtensionManager.ROLE );
+ (LifecycleExtensionManager)serviceManager.lookup( LifecycleExtensionManager.ROLE );
}
else
{
- m_extManager = new org.apache.avalon.fortress.impl.LifecycleExtensionManager();
+ m_extManager = new LifecycleExtensionManager();
m_extManager.enableLogging( getLogger() );
if( getLogger().isDebugEnabled() )
1.6 +2 -1 avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/DefaultContainerManager.java
Index: DefaultContainerManager.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/DefaultContainerManager.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DefaultContainerManager.java 25 Feb 2003 16:28:33 -0000 1.5
+++ DefaultContainerManager.java 7 Mar 2003 13:14:21 -0000 1.6
@@ -65,6 +65,7 @@
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.service.DefaultServiceManager;
import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.excalibur.container.lifecycle.LifecycleExtensionManager;
import org.apache.excalibur.event.Queue;
import org.apache.excalibur.instrument.InstrumentManager;
import org.apache.excalibur.mpool.PoolManager;
1.7 +4 -2 avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/handler/ComponentFactory.java
Index: ComponentFactory.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/handler/ComponentFactory.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ComponentFactory.java 6 Mar 2003 19:42:08 -0000 1.6
+++ ComponentFactory.java 7 Mar 2003 13:14:22 -0000 1.7
@@ -50,7 +50,6 @@
package org.apache.avalon.fortress.impl.handler;
import org.apache.avalon.excalibur.logger.LoggerManager;
-import org.apache.avalon.fortress.impl.LifecycleExtensionManager;
import org.apache.avalon.framework.component.WrapperComponentManager;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.container.ContainerUtil;
@@ -62,6 +61,7 @@
import org.apache.avalon.framework.parameters.Parameterizable;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.excalibur.container.lifecycle.LifecycleExtensionManager;
import org.apache.excalibur.instrument.AbstractLogEnabledInstrumentable;
import org.apache.excalibur.instrument.CounterInstrument;
import org.apache.excalibur.instrument.InstrumentManageable;
@@ -150,6 +150,8 @@
m_newInstance = new CounterInstrument( "creates" );
m_dispose = new CounterInstrument( "destroys" );
+
+ setInstrumentableName("factory");
addInstrument(m_newInstance);
addInstrument(m_dispose);
1.6 +2 -2 avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/handler/LEAwareComponentHandler.java
Index: LEAwareComponentHandler.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/impl/handler/LEAwareComponentHandler.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- LEAwareComponentHandler.java 6 Mar 2003 19:42:08 -0000 1.5
+++ LEAwareComponentHandler.java 7 Mar 2003 13:14:22 -0000 1.6
@@ -49,10 +49,10 @@
*/
package org.apache.avalon.fortress.impl.handler;
-import org.apache.avalon.fortress.impl.LifecycleExtensionManager;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.container.ContainerUtil;
import org.apache.avalon.framework.context.Context;
+import org.apache.excalibur.container.lifecycle.LifecycleExtensionManager;
/**
* A ComponentHandler that delegates to underlying handler but also
1.4 +7 -1 avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/FortressConfig.java
Index: FortressConfig.java
===================================================================
RCS file: /home/cvs/avalon-excalibur/fortress/src/java/org/apache/avalon/fortress/util/FortressConfig.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FortressConfig.java 25 Feb 2003 16:28:28 -0000 1.3
+++ FortressConfig.java 7 Mar 2003 13:14:22 -0000 1.4
@@ -58,6 +58,7 @@
import org.apache.avalon.framework.context.ContextException;
import org.apache.avalon.framework.context.DefaultContext;
import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.excalibur.container.lifecycle.LifecycleExtensionManager;
import org.apache.excalibur.event.Queue;
import org.apache.excalibur.instrument.InstrumentManager;
import org.apache.excalibur.mpool.PoolManager;
@@ -162,6 +163,11 @@
public void setServiceManager( final ServiceManager componentManager )
{
m_context.put( ContextManagerConstants.SERVICE_MANAGER, componentManager );
+ }
+
+ public void setLifecycleExtensionManager( final LifecycleExtensionManager extensionManager )
+ {
+ m_context.put( LifecycleExtensionManager.ROLE, extensionManager );
}
public void setContainerClass( final String containerClass )
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org