News - tagged as "release"

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!


Weld 3.1.5.Final

2020-8-12   release   Matej Novotny

New maintenance release is now out - Weld 3.1.5.Final. It comes along with Weld API 3.1.SP3 although there are no significant changes in the API. The release was mainly to update to a new parent project version, allowing us to consume newer plugins and prepare ground for MR JAR support. As for core artifacts, there are some bugfixes as usual, so let’s take a look at those.

Fixes and improvements:

  • Weld Core

    • Allow to aggressively invoke setAttribute() when manipulating with conversation map in session (WELD-2626)

      • This behaviour is gated behind a property; it doesn’t affect standard Weld behaviour

    • Automatically cleanup leftover HttpSessionDestructionContext when starting new session context on a thread (WELD-2631)

    • Fix a rare case where an integer overflow could happen during alternative priority ordering (WELD-2628)

  • Weld Servlet Support

    • Change WebAppBeanArchiveScanner to allow serving modules without publishing (WELD-2570)

  • Other bits

    • ObserverMethodConfigurator initialized by reading an AnnotatedType previously didn’t set the method as async when it should (WELD-2609)

    • Fix up generation of javadoc (especially with JDK 11) for shaded artifacts and make it include Weld API/SPI as well as CDI API javadoc

    • Prepare ground for MR JAR releases which are a likely solution to JDK 11 class defining for SE (WELD-2619)

      • This is hopefully coming in the very next release

    • Updates to website tooling (Docker image, Ruby dependencies) and updates to some old http references which should now be https

    • Re-enable testing of CDI TCK 1.2 with Weld 3.x; this was broken sometime during migration to Jakarta artifacts (WELD-2624)

    • A test that assumed an order in between conversation context lifecycle and session timeouts was found to be wrong (ConversationContextDestroyedOnSessionTimeoutTest) and was re-written to remove the erroneous assumption (WELD-2629)

    • Correct JaCoCo TCK execution (WELD-2625)

WildFly Patch

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

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


Weld 4 and Jakarta EE 9

2020-5-13   release , jakarta   Matej Novotny

Weld Meets Jakarta EE 9

Most of you surely know that Jakarta EE 9 is on the horizon; slowly but steadily it is making its way into Java world. And we are not far behind, in fact we have just released Weld 4.0.0.Alpha2 which is an implementation of CDI 3.0! You heard that right, in Jakarta EE 9, all APIs have bumped their major versions; CDI turned 3.0 and so Weld version implementing that became 4.0. Hand in hand with it goes Weld API 4.0.Alpha1, also adapted to EE 9.

Some basic information about the release:

  • All the bits should be available in Maven Central at this point.

  • There is also .zip distribution as usual, see download page for more information.

  • No WildFly patch is provided this time around because WildFly does not yet have an EE 9 branch.

Working and Broken Parts

The only, yet considerably huge, change in APIs is (or at least should be) the swap from javax to jakarta packages. This comes with bunch of problems, for instance there is no EE server that could run on EE 9 with new packages yet. GlassFish is going to be first and they are working on integrating all the EE 9 reference implementations. There are some chicken-egg problems such as Weld requiring EE 9 server to execute CDI TCKs, but at the same time there is GlassFish needing Weld 4.0 to start operating with EE 9 in the first place. For this reason, our first few 4.0 releases are going to be marked as Alpha or Beta, they will not be fully tested and might be missing some parts that previous releases contained.

Here’s what’s working:

  • All testing that doesn’t require full EE container

  • Weld core implementation and API works as usual and is fully released

  • Weld examples work only partially, all those needing EE container have nowhere to be deployed

  • Weld SE works fully

  • Weld Probe should work so long as you are in SE

And here are the missing parts:

  • We cannot execute CDI TCKs until there are stable GlassFish build

    • We should be able to renew this pretty soon

  • Other in-container tests that we have (running on WildFly) are now disabled

  • Servlet parts of Weld are completely excluded from early releases

    • This is because there is currently no servlet working on EE 9, therefore we have nothing to adapt our internals to, yet

One big and sadly unanswered question is that of backward compatibility. In Jakarta itself, there seems to be a consensus of EE 9 not being backward compatible with EE 8. Weld 4 on its own will not work with applications written for Java EE 8 - basically with anything requiring old javax namespace packages. However, EE servers will be forced to adapt somehow, so I expect a tooling might eventually emerge that will allow to run legacy applications on newer servers. But that is yet to be seen and surely no sooner than after EE 9 release when other big servers start to adopt it.

Development Plans

Just to make things clear - we are planning on actively developing both, Weld 3 and Weld 4. We understand that EE server will need to take their time switching to Jakarta EE 9, all the more due to the aforementioned circumstances around backward compatibility. Therefore, both our versions will get their share of updates and bug fixes in the future!


Weld 3.1.4.Final

2020-3-28   release   Matej Novotny

New Weld version is here, say hello to Weld 3.1.4.Final. There are only few issues included in this release, so let’s take a look at them.

Fixes and improvements:

  • Weld Core

    • ObserverMethodConfigurator initialized by reading an AnnotatedType previously didn’t set the method as async when it should (WELD-2609)

    • Fixed observability of @Destroyed events for Conversation context when there are multiple WARs deployed (WELD-2610)

    • After a failed attempt to restore a conversation, Weld could omit firing @Initialized event; this is now working properly (WELD-2611)

    • Cleanup of stored conversations required unnecessarily many locks simultaneously which could lead to deadlock on some servers (WELD-2612)

    • Removed Unsafe usage as means of cracking open ClassLoader for proxy definition (WELD-2613)

      • This only helped to hide IllegalAccess warning on JDK 11 (which will now show again)

      • Starting with JDK 12 and newer, Unsafe doesn’t work at all making this solution obsolete

      • We’ve created (WELD-2619) in order to search for better solution that would work across all JDK versions

    • Using HttpSessionContext.destroy() could sometimes not destroy the instance if it wasn’t used in current request (WELD-2615)

    • Fix OSGi versions for EE dependencies (WELD-2616)

    • Properly close stream after reading weld.properties (WELD-2606)

WildFly Patch

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

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


Weld 3.1.3.Final

2019-11-28   release   Matej Novotny

Weld 3.1.3.Final arrives along with Weld API 3.1.SP2. This is a minor update which had a main goal of swapping whole Weld internals from Java EE 8 to Jakarta EE 8.

Fixes and improvements:

  • Weld API/SPI

    • API was transferred to Jakarta EE GAVs (WELD-2598)

  • Weld Core

    • Core and whole testing was transferred to Jakarta EE GAvs (WELD-2598)

    • Properties inside beans.xml now support spec-descriptor-property-replacement on WildFly (WELD-2600)

    • Rolling updates delimiter is now correctly ignored for external bean archives (WELD-2596)

    • Allow for private final method in intercepted beans, these methods are then ignored during interception but Weld no longer blows up (WELD-2595)

  • Weld Servlet

    • Adjust Jetty attributes accordingly to how they were renamed (WELD-2597)

  • Other

    • Fix several misplaced licenses that were causing confusion (WELD-2599)

WildFly Patch

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

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


Weld 3.1.2.Final

2019-8-6   release   Matej Novotny

Weld 3.1.2.Final is coming along with Weld API 3.1.SP1. It is another small release bringing in mainly bugfixes. One notable thing is that thanks to guys from Jetty, Weld 3.1.2.Final is ready to operate with lastest Jetty 9 as well as upcoming Jetty 10. Other than that we have tried to address some dodgy issues with possible race conditions and leaks - see for yourself!

Fixes and improvements:

  • Weld API/SPI

    • Fixed possible leak in Jandex index through SimpleServiceRegistry (WELD-2592)

      • This could only happen on application server supporting Jandex index and was only noticeable with a lot of application deployed at the same time

  • Weld Core

    • Fixed a case where some context event notification wouldn’t trigger observers due to race condition (WELD-2557)

    • Fixed rare IllegalAccessError problem during interception when methods had (package) private parameters from different methods (WELD-2583)

      • Such methods are now automatically ignored when creating intercepted subclasses

    • Attempted to fix a race condition that could happen when trying to concurrently initiate conversation ID generator (WELD-2585)

    • Weld now correctly disregards synthetic methods when considering proxyability (WELD-2586)

    • Correction to beans.xml parses when using Weld namespace (WELD-2591)

  • Weld SE

    • Improved classpath scanning to account for manifest file entries (WELD-2589)

    • javax.enterprise.inject.scan.implicit=true and org.jboss.weld.se.archive.isolation=false now work together correctly (WELD-2590)

  • Weld Servlet

    • Update Weld to new Jetty integration model prior to Jetty release (WELD-2587)

      • Weld 3.1.2.Final is ready to roll with to-be-released Jetty 9.4.x as well as Jetty 10.x

      • Of course we also kept legacy support in place, so even older version will still run

WildFly Patch

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

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


Weld 3.1.1.Final

2019-5-7   release   Matej Novotny

Weld 3.1.1.Final is out, it is a rather small nonetheless important maintenance release. There is bunch of fixes present here; notably one for context propagation API that could cause some headaches with context seemingly not propagating. Moving on, we also have some improvements to asynchronous events on default executors or ordering on ProcessAnnotatedType events.

Fixes and improvements:

  • Weld API/SPI

  • Weld Core

    • WeldAlterableContext#clearAndSet() was incorrectly leaving some caches behind (WELD-2566)

    • Fix serializability issue with intercepted session beans having private methods (WELD-2574)

    • Asynchronous event notification on default executor should preserve TCCL (WELD-2573)

    • Fix ordering of ProcessAnnotatedType events via @Priority (WELD-2568)

    • Small optimization for distributed environment when bean index is empty (WELD-2577)

    • Custom InjectionTarget now invokes any present dispose() (WELD-2580)

    • Align behaviour of self-invocation of otherwise intercepted method from within private final observer method (WELD-2571)

  • Weld SE

    • Allow to specify custom DiscoveryStrategy via service loader mechanism (WELD-2578)

  • Other

    • Update tooling around documentation builds (WELD-2564)

    • Update JBoss classfilewriter to newer version working on JDK 12 (WELD-2572)

    • Fix Probe functional tests on latest Firefox (WELD-2579)

WildFly Patch

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

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


Weld 3.1.0.Final

2019-2-6   release   Matej Novotny

Weld 3.1.0.Final and Weld API 3.1.Final are now up for grabs. What’s in it for you?

There are quite a few new things in the mix - InterceptionFactory improvements, new API clases and methods, improvements to class defining for integrators in preparation for JDK 12. We now also support CDI context propagation between threads; there is a whole new SPI that allows users and/or frameworks to propagate request, session or conversation contexts. Last but no least, there are bug fixes, so let’s get right into it!

Note
Integrators (WildFly, Liberty, GlassFish, …​) will have to adjust to the changes made in SPI. Those are, most notably, the removal of long deprecated methods (WELD-2558) and reworked ProxyServices which now delegate class defining responsibility to the integrator (WELD-2556). This is crucial for Weld to operate on newer JDKs (12) and while Weld will work with the old approach for now, we will eventually fully swap to this new SPI.

Fixes and improvements:

  • Weld API/SPI

    • Added API to allow for CDI context propagation between threads (WELD-2497)

      • New API class was introduced (WeldAlterableContext), this class offers methods to manipulate context state

      • You can now propagate Request, Session and Conversation contexts between threads as they all implement WeldAlterableContext

      • This comes with certain limitations and is mostly designed for frameworks which would do this for you (such as MicroProfile Concurrency) but anyone can use it

      • For more information, please glance at this part of Weld documentation

    • WeldManager, providing extra methods over what BeanManager offers, is now an injectable bean (WELD-2538)

    • WeldManager now offers new util methods allowing you to easily grab active contexts

      • This is mainly for the purpose of context propagation as it also allows you to grab all active contexts that support it

    • WeldManager can now be used to check if any given context is active without having to care about exceptions (WELD-2537)

    • Added new SPI for class defining, deprecated old approach in ProxyServices (WELD-2556)

      • Integrators will have to implement this new API to be able to operate on JDK 12+

      • Weld now delegates class defining to integrators in order to avoid having to crack open ClassLoader methods

      • Previously, integrators provided ClassLoader instance which Weld then used to invoke defineClass() methods

      • We now ask integrators to invoke those methods themselves while providing them with all the necessary bits for doing so

    • Remove deprecated parts of API/SPI (WELD-2558)

      • Lots of unused and long deprecated methods were removed, should have no effect on code as those weren’t used anyway (most of them since Weld 3.0.0)

  • Weld Core

    • Weld will now log a WARNING if you try to register an invalid qualifier (WELD-2522)

    • You can now use InterceptionFactory with an interface as a parameter (WELD-2550, WELD-2533)

      • This means the proxy class will be based off an interface which is by definition always proxyable

      • You can therefore even supply an unproxyable implementation and it will still work

      • Note that this is experimental feature with some limitations to it, see Weld docs for more details

    • Correct atomic behaviour in RequestContextController (WELD-2536)

    • Fix rare race condition in ConcurrentValidator (WELD-2545)

    • Small correction to interceptor resolution when they have no bindings (WELD-2521)

    • Enforce consistent behaviour between AnnotatedType and WithAnnotations in regards to default methods (WELD-2551)

    • All proxy-specific methods added by Weld now have more complex names to avoid (very rare) method clashes (WELD-2508)

    • Lower logging level of InterceptorLogger.unableToDetermineInterceptedBean() from WARN to INFO (WELD-2546)

  • Weld SE

    • You can now extend the set of bean defining annotations in Weld SE (WELD-2523)

      • This is handy for when you have discovery on and want custom beans automatically picked up while still avoiding the all discovery mode

    • Fix bug in handling JAR dependencies added onto classpath where you could accidentally add more packages than desired (WELD-2535)

    • Correct ALLOW_OPTIMIZED_CLEANUP configuration key value (WELD-2547)

    • When running with SecurityManager enabled, Weld will now refuse to use ForkJoinPool for startup and will pick different pool instead (WELD-2517)

  • Probe development tool

    • Make sure ProbeExtension has priority over any other existing extensions (WELD-2524)

  • Other

    • Stabilize testsuite and make sure dependencies are EE 8 based (WELD-2519, WELD-2553)

    • Documentation has been updated to reflects EE 8 versions of servers (WELD-2529)

    • Documented all changes coming to Weld API in 3.1 update (WELD-2540)

    • Re-enable SpotBugs code quality checking on JDK 11+ (WELD-2544)

    • Upgraded WildFly Arquillian adapter to 2.1.1.Final (WELD-2543)

    • Revisit testing on Jetty (WELD-2528)

    • We are now regularly testing with JDK 11 and looking into JDK 12 testing

WildFly Patch

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

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


Weld 2.4.8.Final

2018-9-26   release   Matej Novotny

Weld 2 has entered maintenance mode with its 2.4.7.Final release earlier this year. Now we are coming with a maintenance release containing fixes to several nuisances you might have come across.

Notable fixes and improvements:

  • Weld Core:

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

      • Note that WildFly does not need to use this

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

    • Corrected decorator subclass creation when said decorator overrides only default method (WELD-2501)

    • Avoid optimizing self invocation of private methods in order to avoid IllegalAccessError(WELD-2506)

    • Allow interception of abstract, package-private classes with public methods (WELD-2507)

    • Fix interception of overriden generic methods invoked via superclass (WELD-2514)

    • Implement reflection fallback for qualifier loading when there are multiple instances of the class in the deployment (WELD-2531)

    • Fixed possible race condition appearing during bean index creation (WELD-2532)

  • Weld SE

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

  • Other

    • Correction to licenses in Probe (WELD-2480)

WildFly Patch

As usual, a patch for WildFly 11.0.0.Final is available. If you’re not familiar with patching WildFly, check the FAQ.