Skip to content

Commit

Permalink
Reusing ExternalConfiguration in ModularWeld
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Aug 5, 2015
1 parent e226048 commit cee9e53
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,21 @@
public class ModularWeld extends Weld
{
private final ModuleScanResult scanResult;
private final ExternalConfiguration config;

public ModularWeld(String containerId, ModuleScanResult scanResult)
{
super(containerId);
this.scanResult = scanResult;
this.config = new ExternalConfigurationBuilder()
.add("org.jboss.weld.bootstrap.preloaderThreadPoolSize", 0)
.add("org.jboss.weld.bootstrap.concurrentDeployment", false).build();
}

@Override
protected Deployment createDeployment(ResourceLoader loader, CDI11Bootstrap bootstrap)
{
Deployment deployment = super.createDeployment(scanResult.getResourceLoader(), bootstrap);
ExternalConfiguration config = new ExternalConfigurationBuilder()
.add("org.jboss.weld.bootstrap.preloaderThreadPoolSize", 0)
.add("org.jboss.weld.bootstrap.concurrentDeployment", false).build();
deployment.getServices().add(ExternalConfiguration.class, config);
return deployment;
}
Expand Down

0 comments on commit cee9e53

Please sign in to comment.