You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/04/24 14:24:43 UTC
cvs commit: avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle AbstractLifestyleHandler.java SingletonLifestyleHandler.java ThreadLocalLifestyleHandler.java
mcconnell 2003/04/24 05:24:43
Modified: merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle
AbstractLifestyleHandler.java
SingletonLifestyleHandler.java
ThreadLocalLifestyleHandler.java
Log:
General housekeeping.
Revision Changes Path
1.4 +10 -9 avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/AbstractLifestyleHandler.java
Index: AbstractLifestyleHandler.java
===================================================================
RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/AbstractLifestyleHandler.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AbstractLifestyleHandler.java 11 Apr 2003 20:14:22 -0000 1.3
+++ AbstractLifestyleHandler.java 24 Apr 2003 12:24:42 -0000 1.4
@@ -152,24 +152,24 @@
* Resolve a object to a value qualified by a supplied service
* reference.
*
- * @param partition the context within the the resolution is applied
+ * @param source the service consumer
* @param ref the reference descriptor
* @return the resolved object
* @throws ContextException if an error occurs
* @todo build a proxy that isolates the service described by the
* ref argument
*/
- public Object resolve( Object partition, String ref )
+ public Object resolve( Object source, String ref )
throws LocatorException
{
- return resolve( partition );
+ return resolve( source );
}
/**
* Activate a service provided by the appliance.
- * @param appliance the appliance to deploy
+ * @param source the consumer
*/
- public abstract Object resolve( Object partition )
+ public abstract Object resolve( Object source )
throws LocatorException;
/**
@@ -229,7 +229,8 @@
try
{
return m_deployment.deploy( m_appliance, m_classloader );
- } catch( Throwable e )
+ }
+ catch( Throwable e )
{
final String error =
"Unable to create new instance for appliance: "
@@ -336,8 +337,8 @@
} catch( Throwable e )
{
final String error =
- "Internal error while attempting to load the implementation class for an appliance: "
- + m_appliance;
+ "Internal error while attempting to load the implementation class for an appliance: "
+ + m_appliance;
throw new LifestyleRuntimeException( error, e );
}
}
1.3 +10 -17 avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/SingletonLifestyleHandler.java
Index: SingletonLifestyleHandler.java
===================================================================
RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/SingletonLifestyleHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SingletonLifestyleHandler.java 11 Apr 2003 20:14:22 -0000 1.2
+++ SingletonLifestyleHandler.java 24 Apr 2003 12:24:42 -0000 1.3
@@ -76,23 +76,14 @@
/**
* Activate a service provided by the appliance.
- * @param appliance the appliance to deploy
+ * @param source the consumer
*/
- public Object resolve( Object partition ) throws LocatorException
+ public Object resolve( Object source ) throws LocatorException
{
return access();
}
/**
- * Activate an extension handler provided by the appliance.
- * @param appliance the appliance to deploy
- */
- //public Object access( StageDescriptor stage ) throws LifestyleException
- //{
- // return access();
- //}
-
- /**
* Activate the implementation.
* @param appliance the appliance to deploy
*/
@@ -101,7 +92,7 @@
if( getLogger().isDebugEnabled() )
{
final String debug =
- "access in appliance: " + getAppliance();
+ "access in appliance: " + getAppliance();
getLogger().debug( debug );
}
@@ -110,7 +101,8 @@
Object object = newInstance();
super.processAccessStage( object );
return object;
- } catch( Throwable e )
+ }
+ catch( Throwable e )
{
final String error = "Singleton object access failure.";
throw new LocatorException( error, e );
@@ -120,11 +112,12 @@
/**
* Release an a service or handler established by the appliance.
* @param object the service to be released
+ * @param soure reference to the consumer
*/
- //public void release( Object object )
- public void release( Object object, Object partition )
+ public void release( Object object, Object source )
{
- // default does nothing
+ // default does nothing - can be optimised if we track
+ // consumers
}
//==============================================================
1.3 +2 -2 avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/ThreadLocalLifestyleHandler.java
Index: ThreadLocalLifestyleHandler.java
===================================================================
RCS file: /home/cvs/avalon-sandbox/merlin/assembly/src/java/org/apache/avalon/assembly/lifestyle/ThreadLocalLifestyleHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ThreadLocalLifestyleHandler.java 11 Apr 2003 20:14:22 -0000 1.2
+++ ThreadLocalLifestyleHandler.java 24 Apr 2003 12:24:42 -0000 1.3
@@ -69,9 +69,9 @@
/**
* Activate a service provided by the appliance.
- * @param appliance the appliance to deploy
+ * @param source the consumer
*/
- public Object resolve( Object partition ) throws LocatorException
+ public Object resolve( Object source ) throws LocatorException
{
return access();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org