Skip to content

Commit

Permalink
ModularWeld just needs ResourceLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Aug 5, 2015
1 parent 51cb67f commit 46c6a62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void start(Addon addon) throws Exception
ContainerServiceExtension serviceExtension = new ContainerServiceExtension(container, addon);
ContainerBeanRegistrant registrantExtension = new ContainerBeanRegistrant();

weld = new ModularWeld(addon.getId().getName(), scanResult);
weld = new ModularWeld(addon.getId().getName(), resourceLoader);
weld.addExtension(serviceExtension);
weld.addExtension(registrantExtension);
WeldContainer container = weld.initialize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
*/
public class ModularWeld extends Weld
{
private final ModuleScanResult scanResult;
private final ResourceLoader resourceLoader;
private final ExternalConfiguration config;

public ModularWeld(String containerId, ModuleScanResult scanResult)
public ModularWeld(String containerId, ResourceLoader resourceLoader)
{
super(containerId);
this.scanResult = scanResult;
this.resourceLoader = resourceLoader;
this.config = new ExternalConfigurationBuilder()
.add("org.jboss.weld.bootstrap.preloaderThreadPoolSize", 0)
.add("org.jboss.weld.bootstrap.concurrentDeployment", false).build();
Expand All @@ -33,7 +33,7 @@ public ModularWeld(String containerId, ModuleScanResult scanResult)
@Override
protected Deployment createDeployment(ResourceLoader loader, CDI11Bootstrap bootstrap)
{
Deployment deployment = super.createDeployment(scanResult.getResourceLoader(), bootstrap);
Deployment deployment = super.createDeployment(resourceLoader, bootstrap);
deployment.getServices().add(ExternalConfiguration.class, config);
return deployment;
}
Expand Down

0 comments on commit 46c6a62

Please sign in to comment.