Skip to content

Commit

Permalink
WELD-1792 Enable relaxed construction by default in weld-se
Browse files Browse the repository at this point in the history
  • Loading branch information
jharting committed Feb 16, 2015
1 parent 75938cf commit cf70d83
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/reference/src/main/asciidoc/configure.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ This mode is not enabled by default. It can be enabled using the following confi
[cols=",,",options="header",]
|=======================================================================
|Configuration key |Default value |Description
|`org.jboss.weld.construction.relaxed` |false|If set to `true`, then requirements on bean constructors are relaxed.
|`org.jboss.weld.construction.relaxed` |false (true in weld-se)|If set to `true`, then requirements on bean constructors are relaxed.
|=======================================================================

Note that relaxed construction is enabled by default in <<weld-se,Weld SE>>.

==== Concurrent deployment configuration

Expand Down
1 change: 1 addition & 0 deletions docs/reference/src/main/asciidoc/environments.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ In general, an implicit bean archive does not have to contain a beans.xml descri

NOTE: The bean discovery mode of `annotated` is supported from version 2.2.5.Final. Previous versions processed implicit bean archives in the same way as explicit bean archives.

[[weld-se]]
=== Java SE

In addition to improved integration of the Enterprise Java stack, the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.jboss.weld.bootstrap.api.helpers.RegistrySingletonProvider;
import org.jboss.weld.bootstrap.spi.Deployment;
import org.jboss.weld.bootstrap.spi.Metadata;
import org.jboss.weld.config.ConfigurationKey;
import org.jboss.weld.configuration.spi.ExternalConfiguration;
import org.jboss.weld.configuration.spi.helpers.ExternalConfigurationBuilder;
import org.jboss.weld.environment.deployment.WeldBeanDeploymentArchive;
Expand Down Expand Up @@ -138,8 +139,12 @@ public WeldContainer initialize() {
final CDI11Bootstrap bootstrap = new WeldBootstrap();
final Deployment deployment = createDeployment(resourceLoader, bootstrap);

// weld-se uses CommonForkJoinPoolExecutorServices by default
ExternalConfiguration configuration = new ExternalConfigurationBuilder().add(EXECUTOR_THREAD_POOL_TYPE.get(), COMMON.toString()).build();
ExternalConfiguration configuration = new ExternalConfigurationBuilder()
// weld-se uses CommonForkJoinPoolExecutorServices by default
.add(EXECUTOR_THREAD_POOL_TYPE.get(), COMMON.toString())
// weld-se uses relaxed construction by default
.add(ConfigurationKey.RELAXED_CONSTRUCTION.get(), true)
.build();
deployment.getServices().add(ExternalConfiguration.class, configuration);

// Set up the container
Expand Down

0 comments on commit cf70d83

Please sign in to comment.