News

Weld 4.0.1.Final

2021-3-22   release   Matej Novotny

First maintainance release of Weld 4 is now available along with API version 4.0.SP1.

The crux of this release is (much like 3.1.7.Final) a rework of Weld’s default class defining capabilities. With 4.0.1.Final you should no longer see illegal reflective access warning so long as you are on JDK 11 or newer. More details on this are below or in the respective JIRA ticket; in case you encounter any issue with it, please don’t hesitate to reach out to us.

So, let’s take a closer look:

  • Class Defining in Weld

    • Weld Core is now a Multi-Release JAR providing two different implementations for JDK 8 and JDK 11 or newer

    • Integrators are still encouraged to implement ProxyServices class from our API

    • For SE environment or an integrator that doesn’t implement the aforementioned API, Weld now provides a default implementation of ProxyServices which:

      • On JDK 8 behaves the same as it did until now - it cracks open ClassLoader.defineClass(…​) method and uses that

      • On JDK 11+ it uses a combination of MethodHandles.Lookup and a custom ClassLoader; the former is used for vast majority of cases with class loader being a solution for edge cases such as default packages or beans from signed JARs

  • Other Weld Core Fixes

    • BeanAttributesConfigurator could incorrectly initialize default qualifiers when @Named was involved (WELD-2659)

    • Synthetic alternative beans did not trigger ProcessBean event as they should when enabled (WELD-2658)

    • Fixed proxy creation for beans in default package (WELD-2657)

    • Fixed a corner case scenario where a hierarchy of classes with bridge methods would not get correctly intercepted (WELD-2656)

    • ProxyFactory now creates determininistic proxy names (WELD-2618)

    • Decorators for interfaces with non-decorated default method now work properly (WELD-2647)

WildFly Patch

There is no WildFly patch at the moment. We are currently exploring how to properly ship a patch that would align with WildFly usage of Galleon; the tracking JIRA can be seen (here).


Weld 3.1.7.Final

2021-3-18   release   Matej Novotny

Weld 3.1.7.Final along with API 3.1.SP4 is now up for grabs!

Along a few bugfixes, the flagship of this release is a rework of Weld’s default class defining utilities which should eliminate those pesky JDK 11+ warnings about illegal reflective access. You can find more details on it below or in the JIRA ticket; in case you encounter any issue with it, please don’t hesitate to reach out to us.

So, let’s take a closer look:

  • Class Defining in Weld

    • Weld Core is now a Multi-Release JAR providing two different implementations for JDK 8 and JDK 11 or newer

    • Integrators are still encouraged to implement ProxyServices class from our API

    • For SE environment or an integrator that doesn’t implement the aforementioned API, Weld now provides a default implementation of ProxyServices which:

      • On JDK 8 behaves the same as it did until now - it cracks open ClassLoader.defineClass(…​) method and uses that

      • On JDK 11+ it uses a combination of MethodHandles.Lookup and a custom ClassLoader; the former is used for vast majority of cases with class loader being a solution for edge cases such as default packages or beans from signed JARs

  • Other Weld Core Fixes

    • BeanAttributesConfigurator could incorrectly initialize default qualifiers when @Named was involved (WELD-2659)

    • Synthetic alternative beans did not trigger ProcessBean event as they should when enabled (WELD-2658)

    • Fixed proxy creation for beans in default package (WELD-2657)

    • Fixed a corner case scenario where a hierarchy of classes with bridge methods would not get correctly intercepted (WELD-2656)

WildFly Patch

There is no WildFly patch at the moment. We are currently exploring how to properly ship a patch that would align with WildFly usage of Galleon; the tracking JIRA can be seen (here).


Weld 3.1.6.Final

2021-1-13   release   Matej Novotny

Weld 3.1.6.Final is now available and brings a dosage of bug fixes and updates with it. Without further due, let’s dive straight into it!

Fixes and improvements:

  • Weld Core

    • Fix for decorators operating on interfaces with default methods (WELD-2647)

    • Weld will no longer try to load classes for specific JDK version when using multi-release JARs (WELD-2652)

    • ProxyFactory was changed to produce more deterministic and sensible names when based off interfaces (WELD-2618)

      • NOTE: this slightly changes names of generated proxy classes but has no effect on the functionality itself

  • Weld Servlet

    • Detect Jetty server in GWT 2.8+ test environment (WELD-2635)

    • Injection into Undertow servlet listener now works as intended (WELD-2636)

      • This should work from Undertow 2.2.0.Final onwards

  • Weld SE

    • Bean defining annotation can be specified as generic SeContainerInitializer property (WELD-2639)

  • Other bits

    • Fixed issue preventing upgrade of surefire plugin in our testsuite (WELD-2634)

    • Several corrections to OSGi package configuration (WELD-2642, WELD-2644, WELD-2645, WELD-2646)

    • Re-introduce multi HTML documentation output in best-effort mode; this is mainly to keep old links working (WELD-2640)

    • Fix intermittent test failure in DispatchingTest caused by race condition (WELD-2650)

WildFly Patch

This time around, the patch for WildFly 21.0.2.Final is available.

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


Weld 4.0.0.Final

2020-12-16   release   Matej Novotny

An early Xmas present for CDI lovers is here - Final release for Weld 4 is now available! You can pick your Xmas jar-packaged present from Maven Central right away.

Since there were no new reported issues after integrating Weld 4.0.0.CR1 version into GlassFish and WildFly EE 9 preview, we have promoted Weld to Final release. Latest core version is now 4.0.0.Final and Weld API that ships with it is 4.0.Final.

Functionally, Weld 3 and 4 remain identical and both are getting the same treatment and doses of bugfixes. The main difference is that Weld 4 operates with EE 9, meaning it expects you to use it with CDI 3.0 along with the new jakarta package names.

Given that most changes poured into this version were more about dependecy updates, structural changes etc., I won’t list them all here. However, if you are still curious, you could take a peek at JIRA release page and browse various Weld 4 releases that we did over time.

What’s more important is that we are keen on hearing from you should you find any issues with this version. Whether you are an integrator or user, we realize no project is ever bug-free and we want to smack those bugs! So if you hit any problems that you think are bugs, let us know via one of the usual channels:

  • Ask on mailing list weld-dev@lists.jboss.org

  • Create JIRA issues

  • Drop the question on Weld Gitter

Last but not least, the Weld team wishes you Merry Christmas and Happy New Year.

WildFly Patch

Sorry to disappoint, but we cannot provide a patch yet. WildFly source code already contains the needed bits for EE 9 server variant, but there wasn’t a release yet. Good news is, once there is a release, it will already contain Weld 4 Final! From there on, we can then deliver patches as we used to.


Weld 4.0.0.Beta1

2020-9-18   release   Matej Novotny

A new Weld 4 release is now available! Latest core version is now 4.0.0.Beta1 and Weld API that ships with it is 4.0.Beta1.

I will not be listing links to issues as usual, because I think more important work was done outside of JIRA tracking this time (although you can check the issues here). Instead, let me sum it up in a short list of noticeable changes:

  • All Weld bits are now present in Maven Central

    • Including servlet core (and shaded) which had to be left out last time

  • We are able to execute CDI TCKs in EE 9 environment once again and it’s all passing

  • We are now able to test servlets with Tomcats and Undertow

  • Reworked documentation generation tooling

    • Weld docs now have similar look to those of CDI and are distributed in either PDF or single page HTML format

  • Did some updates on Javadoc generation in API and Core if generated with JDK 11

  • Big update pass on tooling and dependencies

    • We are now using Dependabot and have bumped almost every dependency and tooling in the project

    • Which also led to nice cleanup and fixing of several issues

On top of that, every bugfix that would go into Weld 3 is of course being added to Weld 4 as well so those aren’t missing either!

WildFly Patch

Sadly we cannot provide a patch for WildFly as there is not yet any official release that would support EE 9. As soon as there is one, we will surely follow up with Weld patch!