Skip to content

Commit

Permalink
FURNACE-80: Changed initialization properties strategy in Weld 2.3.0.…
Browse files Browse the repository at this point in the history
…Final
  • Loading branch information
gastaldi committed Sep 21, 2015
1 parent 97b6b3d commit 83d459a
Showing 1 changed file with 2 additions and 7 deletions.
Expand Up @@ -8,8 +8,6 @@

import org.jboss.weld.bootstrap.api.CDI11Bootstrap;
import org.jboss.weld.bootstrap.spi.Deployment;
import org.jboss.weld.configuration.spi.ExternalConfiguration;
import org.jboss.weld.configuration.spi.helpers.ExternalConfigurationBuilder;
import org.jboss.weld.environment.se.Weld;
import org.jboss.weld.resources.spi.ResourceLoader;

Expand All @@ -19,22 +17,19 @@
public class ModularWeld extends Weld
{
private final ResourceLoader resourceLoader;
private final ExternalConfiguration config;

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

@Override
protected Deployment createDeployment(ResourceLoader loader, CDI11Bootstrap bootstrap)
{
Deployment deployment = super.createDeployment(resourceLoader, bootstrap);
deployment.getServices().add(ExternalConfiguration.class, config);
return deployment;
}
}

0 comments on commit 83d459a

Please sign in to comment.