mcconnell 2002/12/16 20:52:50
Modified: assembly/src/java/org/apache/avalon/assembly/appliance
DefaultApplianceManager.java
Log:
Removed redundant appliance factory code.
Revision Changes Path
1.8 +1 -81
avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultApplianceManager.java
Index: DefaultApplianceManager.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/assembly/src/java/org/apache/avalon/assembly/appliance/DefaultApplianceManager.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DefaultApplianceManager.java 15 Dec 2002 14:08:56 -0000 1.7
+++ DefaultApplianceManager.java 17 Dec 2002 04:52:50 -0000 1.8
@@ -210,92 +210,12 @@
throw new IllegalStateException( "service" );
}
- /*
- try
- {
- DefaultApplianceFactory factory = new DefaultApplianceFactory();
- factory.enableLogging( getLogger().getChildLogger( "factory" ) );
- factory.initialize();
- m_factory = factory;
- }
- catch( Throwable e )
- {
- final String error =
- "Internal error while establishing the default applaince factory.";
- throw new ApplianceRuntimeException( error, e );
- }
- */
m_initialized = true;
}
//==================================================================
// ApplianceManager
//==================================================================
-
- /**
- * Return an appliance factory based on a supplied Profile.
- * @param profile a deployment profile
- * @return an appliance factory
- */
- /*
- public ApplianceFactory getApplianceFactory( Profile profile )
- {
- if( !m_initialized )
- {
- throw new IllegalStateException( "initilization" );
- }
-
- InfoDescriptor info = profile.getType().getInfo();
- String classname =
- info.getAttribute(
- "urn:assembly:appliance.factory-service", null );
- if( classname == null )
- {
- return m_factory;
- }
-
- //
- // we have an explicit factory declaration
- //
-
- final String version =
- info.getAttribute(
- "urn:assembly:appliance.factory-version", "1" );
-
- final DependencyDescriptor dep =
- new DependencyDescriptor( "factory", classname, Version.getVersion(
version ));
-
- if( getLogger().isDebugEnabled() )
- {
- getLogger().debug( "factory: " + dep );
- }
-
- Appliance appliance;
- try
- {
- appliance = m_engine.resolve( dep );
- }
- catch( Throwable e )
- {
- final String error =
- "Could not resolve a provider for the custom factory: "
- + dep.getReference();
- throw new ApplianceRuntimeException( error, e );
- }
-
- try
- {
- return (ApplianceFactory) appliance.access( dep );
- }
- catch( Throwable e )
- {
- final String error =
- "Could not establish custom factory: "
- + dep.getReference();
- throw new ApplianceRuntimeException( error, e );
- }
- }
- */
/**
* Return the set of appliance istances capable of supporting the supplied
dependency.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>