WildFly 12.0.0.Final + Weld 3.0.3.Final - How to use CDI 2.0?

269 views Asked by At

On the Weld.org page, it says for WildFly 12.0.0.Final:

WildFly 12.0.0.Final Weld 3.0.3.Final CDI 1.2 and CDI 2.0 (opt-in via property)

I can't see how to "opt-in via property"?

1

There are 1 answers

1
Siliarus On BEST ANSWER

What you need to do is look at WildFly site, because you need to run WildFly in so called "EE8 preview" mode in order to have certain EE 8 techs (CDI 2.0 including) enabled. Namely this article says it all:

By default WildFly 12 launches in EE7 mode. In order to use these new capabilities you have to enable EE8 preview mode. This can be accomplished by passing the ee8.preview.mode property during startup:

./standalone.sh -Dee8.preview.mode=true

There are other options, such as CLI config or modifying the standalone config file. Take a glance at the article to see how that is achieved.