try
{
//m_baseWorkDirectory
installation = m_installer.install( name, location );
final Configuration config =
getConfigurationFor( installation,
ContainerConstants.INSTALL_CONFIG,
null );
final Configuration environment =
getConfigurationFor( installation,
ContainerConstants.INSTALL_ENVIRONMENT,
null );
final Configuration assembly =
getConfigurationFor( installation,
ContainerConstants.INSTALL_ASSEMBLY,
ConfigurationBuilder.ASSEMBLY_SCHEMA );
final File homeDirectory =
(File)installation.get( ContainerConstants.INSTALL_HOME );
final File workDirectory =
(File)installation.get( ContainerConstants.INSTALL_WORK );
final Map data = new HashMap();
data.put( BlockContext.APP_NAME, name );
data.put( BlockContext.APP_HOME_DIR, homeDirectory );
final Configuration logs = environment.getChild( "logs", false );
//Load hierarchy before classloader placed in context as
//that way the logFactory will not try to use the application
//specific classloader to load the targets which will cause
//CastClassExceptions
final LoggerStore store =
m_logManager.createHierarchy( logs,
homeDirectory,
workDirectory,
data );
final ClassLoaderSet classLoaderSet =
m_classLoaderManager.createClassLoaderSet( environment,
data,
homeDirectory,
workDirectory );
//TODO: Add classLoaderSet to application resources
final ClassLoader classLoader =
classLoaderSet.getDefaultClassLoader();
final Configuration newConfig =
processConfiguration( name, config );
final Map parameters = new HashMap();
parameters.put( ContainerConstants.ASSEMBLY_NAME, name );
parameters.put( ContainerConstants.ASSEMBLY_DESCRIPTOR, assembly );