You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by do...@apache.org on 2002/05/11 08:04:19 UTC
cvs commit: jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer DefaultDeployer.java
donaldp 02/05/10 23:04:19
Modified: src/java/org/apache/avalon/phoenix/components/deployer
DefaultDeployer.java
Log:
A touch of code cleanup
Revision Changes Path
1.27 +16 -12 jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/DefaultDeployer.java
Index: DefaultDeployer.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/deployer/DefaultDeployer.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- DefaultDeployer.java 11 May 2002 02:05:13 -0000 1.26
+++ DefaultDeployer.java 11 May 2002 06:04:19 -0000 1.27
@@ -228,13 +228,13 @@
m_installer.install( location, m_baseWorkDirectory );
final Configuration config = getConfigurationFor( installation.getConfig() );
- final Configuration server = getConfigurationFor( installation.getEnvironment() );
+ final Configuration environment = getConfigurationFor( installation.getEnvironment() );
final Configuration assembly = getConfigurationFor( installation.getAssembly() );
final File directory = installation.getDirectory();
final ClassLoader classLoader =
- m_classLoaderManager.createClassLoader( server,
+ m_classLoaderManager.createClassLoader( environment,
installation.getSource(),
installation.getDirectory(),
installation.getWorkDirectory(),
@@ -246,18 +246,20 @@
m_verifier.verifySar( metaData, classLoader );
//Setup configuration for all the applications blocks
- setupConfiguration( name, metaData, config.getChildren() );
+ setupConfiguration( metaData, config.getChildren() );
- final Configuration logs = server.getChild( "logs" );
+ final Configuration logs = environment.getChild( "logs" );
final Hierarchy hierarchy = m_logManager.createHierarchy( metaData, logs );
//Finally add application to kernel
- m_kernel.addApplication( metaData, classLoader, hierarchy, server );
+ m_kernel.addApplication( metaData, classLoader, hierarchy, environment );
- m_installations.put( name, installation );
+ m_installations.put( metaData.getName(), installation );
final String message =
- REZ.getString( "deploy.notice.sar.add", name, installation.getClassPath() );
+ REZ.getString( "deploy.notice.sar.add",
+ metaData.getName(),
+ installation.getClassPath() );
getLogger().debug( message );
}
catch( final DeploymentException de )
@@ -300,13 +302,11 @@
/**
* Setup Configuration for all the Blocks/BlockListeners in Sar.
*
- * @param appName the name of Application.
* @param metaData the SarMetaData.
* @param configurations the block configurations.
* @throws DeploymentException if an error occurs
*/
- private void setupConfiguration( final String appName,
- final SarMetaData metaData,
+ private void setupConfiguration( final SarMetaData metaData,
final Configuration[] configurations )
throws DeploymentException
{
@@ -318,13 +318,17 @@
if( !hasBlock( name, metaData.getBlocks() ) &&
!hasBlockListener( name, metaData.getListeners() ) )
{
- final String message = REZ.getString( "deploy.error.extra.config", name );
+ final String message =
+ REZ.getString( "deploy.error.extra.config",
+ name );
throw new DeploymentException( message );
}
try
{
- m_repository.storeConfiguration( appName, name, configuration );
+ m_repository.storeConfiguration( metaData.getName(),
+ name,
+ configuration );
}
catch( final ConfigurationException ce )
{
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>