ApplicationClassLoaderFactory applicationClassLoaderFactory = new MuleApplicationClassLoaderFactory(domainClassLoaderRepository, new DefaultNativeLibraryFinderFactory());
applicationClassLoaderFactory = new CompositeApplicationClassLoaderFactory(applicationClassLoaderFactory, pluginClassLoaderManager);
DefaultDomainFactory domainFactory = new DefaultDomainFactory(domainClassLoaderRepository);
domainFactory.setDeploymentListener(domainDeploymentListener);
DefaultApplicationFactory applicationFactory = new DefaultApplicationFactory(applicationClassLoaderFactory, domainFactory);
applicationFactory.setDeploymentListener(applicationDeploymentListener);
ArtifactDeployer<Application> applicationMuleDeployer = new DefaultArtifactDeployer<Application>();
ArtifactDeployer<Domain> domainMuleDeployer = new DefaultArtifactDeployer<Domain>();
this.applicationDeployer = new DefaultArchiveDeployer(applicationMuleDeployer, applicationFactory, applications, deploymentLock);