Weld 3.1.0.Final
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
andConversation
contexts between threads as they all implementWeldAlterableContext
-
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 whatBeanManager
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 invokedefineClass()
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
andWithAnnotations
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()
fromWARN
toINFO
(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 useForkJoinPool
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.
[ Download ] [ Documentation ] [ Release notes ]