Skip to content

Commit

Permalink
FURNACE-34: Upgrade to Weld 2.2.15.Final
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Aug 4, 2015
1 parent e807a3e commit e226048
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 75 deletions.

This file was deleted.

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(scanResult);
weld = new ModularWeld(addon.getId().getName(), scanResult);
weld.addExtension(serviceExtension);
weld.addExtension(registrantExtension);
WeldContainer container = weld.initialize();
Expand All @@ -95,7 +95,8 @@ public void start(Addon addon) throws Exception

ServiceRegistryProducer serviceRegistryProducer = BeanManagerUtils.getContextualInstance(manager,
ServiceRegistryProducer.class);
serviceRegistry = new WeldServiceRegistry(furnace.getLockManager(), addon, manager, serviceExtension.getServices());
serviceRegistry = new WeldServiceRegistry(furnace.getLockManager(), addon, manager,
serviceExtension.getServices());
serviceRegistryProducer.setServiceRegistry(serviceRegistry);
Assert.notNull(BeanManagerUtils.getContextualInstance(manager, ServiceRegistry.class),
"InboundEvent registry was null.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import java.util.Collection;
import java.util.List;

import org.jboss.weld.environment.se.discovery.url.ClasspathScanningException;
import org.jboss.weld.resources.spi.ResourceLoader;

/**
Expand Down Expand Up @@ -88,7 +87,7 @@ public ModuleScanResult scan()
}
catch (UnsupportedEncodingException ex)
{
throw new ClasspathScanningException("Error decoding URL using UTF-8");
throw new RuntimeException("Error decoding URL using UTF-8");
}

paths.add(urlPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
*/
package org.jboss.forge.furnace.container.cdi.weld;

import org.jboss.forge.furnace.container.cdi.impl.PerformanceTunedBootstrapConfiguration;
import org.jboss.weld.bootstrap.api.CDI11Bootstrap;
import org.jboss.weld.bootstrap.api.SingletonProvider;
import org.jboss.weld.bootstrap.api.helpers.TCCLSingletonProvider;
import org.jboss.weld.bootstrap.spi.BootstrapConfiguration;
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 @@ -20,26 +18,22 @@
*/
public class ModularWeld extends Weld
{
static
{
/*
* This must happen once per JVM
*/
SingletonProvider.initialize(new TCCLSingletonProvider());
}

private final ModuleScanResult scanResult;

public ModularWeld(ModuleScanResult scanResult)
public ModularWeld(String containerId, ModuleScanResult scanResult)
{
super(containerId);
this.scanResult = scanResult;
}

@Override
protected Deployment createDeployment(ResourceLoader loader, CDI11Bootstrap bootstrap)
{
Deployment deployment = super.createDeployment(scanResult.getResourceLoader(), bootstrap);
deployment.getServices().add(BootstrapConfiguration.class, new PerformanceTunedBootstrapConfiguration());
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;
}
}
5 changes: 2 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@
<forge.scm.url>http://github.com/forge/furnace-cdi</forge.scm.url>
<!-- This version is bound to the Weld version -->
<version.annotations>1.0.0.Alpha1</version.annotations>
<version.cdi>1.1</version.cdi>
<version.cdi>1.2</version.cdi>
<version.furnace>${project.version}</version.furnace>
<version.javax.el>2.2.4</version.javax.el>
<version.jboss.spec>3.0.2.Final</version.jboss.spec>
<version.slf4j>1.7.2</version.slf4j>
<version.weld>2.2.1.Final</version.weld>
<version.weld>2.2.15.Final</version.weld>
<version.junit>4.11</version.junit>
</properties>

Expand Down

0 comments on commit e226048

Please sign in to comment.