Weld 3.0.4.Final

2018-4-26   release   Matej Novotny

Weld 3.0.4.Final is here along with Weld API 3.0.SP3 - make sure you update both.

In this release we took first steps towards eliminating illegal access in JDK 10+. The good news is, Weld should now be able to run with --illegal-access=deny. The project and CI infrastructure around it went through a lot of changes to be able to build and execute on JDK 10 and there is still more to come. There are also numerous optimizations - beans.xml parsing, AT identifier representation, optional memory savings. And of course, bug fixes, so let us take a look at all of it.

Noticeable amount of reports, suggestions and even fixes came from the community - for that you have our thanks (and a new version of Weld of course)!

Fixes and improvements:

  • Weld Core

    • Correct proxy generation for class hierarchy with abstract class and generics (WELD-2470)

    • Opt-in enhancement in HTTP session replication, more eager approach (WELD-1130)

      • Note that WildFly does not need or use this

    • Fix NPE which could occur with SecurityManager if getPermissions() returned null (WELD-2464)

    • Relax bean type check in BeanManager.getInjectableReference() (WELD-2466)

    • AfterTypeDiscovery did not allow to remove declared interceptors/decorators/alternatives correctly (WELD-2479)

    • Two globally selected alternatives with the same priority should result in ambiguous dependency (WELD-2482)

    • Configurator SPI now uses sensible toString() so that user can tell what went wrong (WELD-2484)

    • Improve performance of beans.xml parsing (WELD-2469)

    • Introduce an optional configuration allowing Weld to perform cleanup after boot (WELD-2457 and WELD-2475)

      • In EE servers, if integrators meet certain conditions and allow for this, Weld can them drop metadata from some beans which will not be used in runtime

      • See Docs section for links

    • Optimise String representation of AnnotatedTypeIdentifier (WELD-2477)

  • Weld SE

    • Fix NPE which could occur if trying to intercept a method called by constructor (WELD-2478 and WELD-2473)

  • JDK 9/10 and onwards (WELD-2460)

    • Weld uses JDK’s internal BCEL classes (WELD-2490)

      • This is only used to report errors in generated bytecode on proxies/subclasses

      • We added a dependency on org.apache.bcel:bcel which enables this functionality without reflective access to internal libraries

      • In order to keep Weld’s footprint minimal, this dependency is optional only

    • Upgrade JBoss Classfilewriter to 1.2.2.Final (WELD-2487)

      • Eliminates another bunch of illegal access problems

  • Probe development tool

    • Probe now uses JDK-agnostic Annotation.toString() version (WELD-2463)

    • Correction to licences in Probe (WELD-2480)

  • Docs

    • WeldTerminalListener had wrong FQCN in our documentation which resulted in errors when trying to use it in Tomcat (WELD-2486)

    • Newly added memory-saving option ConfigurationKey.ALLOW_OPTIMIZED_CLEANUP is documented (WELD-2472)

      • If you wish to learn more, please glance here

      • Please note that integrator has to allow for this optimization, otherwise your settings won’t count (psst, WildFly 12 allows this!)

WildFly Patch

As usual, a patch for WildFly 12.0.0.Final is available. Please note that Weld 3.0.4.Final will still allow you to boot up WildFly in either EE 7 or EE 8 mode, whichever you prefer.

If this is the first time you hear about EE 8 mode for WildFly, check this post.

If you’re not familiar with patching WildFly, check the FAQ.