News - tagged as "release"

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.


Weld 2.4.7.Final

2018-3-20   release   Matej Novotny

Weld 2.4.7.Final is now available. It includes multiple important bugfixes, many of them focused around proxy generation and/or invocation.

Note
Weld 2.4 now enters maintenance mode - there will be no further active development on Weld 2. We will be channeling our efforts into Weld 3 instead.

Notable fixes and improvements:

  • Weld Core:

    • Proxy-related issues:

      • Fixed possible NPE with multiple deployments one of which uses relaxed construction configuration (WELD-2448)

      • BeanManager.getInjectableReference was using unnecessarily strict checks for proxyability (WELD-2466)

      • Proxy serialization is now container agnostic (WELD-2447)

      • Fix invocation of private observer method (WELD-2443)

        • This only applies to private observer method which is not intercepted but is declared on a bean which has some other intercepted methods

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

    • Other issues:

      • Minor optimization in internal structures of InterceptionModel (WELD-2455)

      • Improve exception logging for DeploymentException (WELD-2453)

      • Prevent NPE if ProtectionDomain.getPermissions() returns null (WELD-2464)

  • Weld SE

    • Fields in org.jboss.weld.environment.se.Weld are now protected (WELD-2451)

    • Allow to register custom BeanArchiveHandler using ServiceLoader mechanism (WELD-2450)

      • This applies to SE and Servlet environments

  • Other

    • With OSGi, javax.ejb is now imported optionally (WELD-2458)

    • Weld now uses SpotBugs (a successor to FindBugs) (WELD-2462)

    • module-info, if present, is now correctly ignored during bean discovery phase (WELD-2459)

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.


Weld 3.0.3.Final

2018-2-9   release   Matej Novotny

How do you cook Weld 3.0.3.Final? You start with a speck of bug fixes add some proxy generation improvements top it off with adjustments for integrators.

Notable fixes and improvements:

  • Weld Core

    • Fixed invocation of private observer method in some very specific cases (WELD-2443)

    • Container agnostic proxy serialization (WELD-2447)

    • Improve shared proxy class instantiation for multiple deployments with relaxed construction enabled (WELD-2448)

    • beans_1_1.xsd is now known to Weld once again (WELD-2445)

    • module-info is now ignored during discovery and won’t give you warnings in log (WELD-2459)

    • Enhanced logging of DeploymentException, it should now be possible to glance more from suppressed exceptions (WELD-2453)

  • Weld SE && Servlet

    • You can now register additional BeanArchiveHandler via ServiceLoader (WELD-2450)

    • Multitude of fields/method in Weld SE builder are now protected and hence extendable (WELD-2451)

  • Other

    • Improvements in documentation (WELD-2449)

    • Weld project now uses SpotBugs instead of FindBugs (WELD-2462)

    • OSGi now requires javax.ejb only optionally (WELD-2458)

WildFly Patch

As usual, there is a patch for WildFly 11.0.0.Final is available.

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


Weld 2.4.6.Final

2017-12-18   release   Matej Novotny

Time has come for another round of Weld 2.4 bugfix release. But that’s not all - this time there is also new API to go along with this release - Weld API 2.4.SP2.

Among other things you can now obtain interceptor binding from javax.interceptor.InvocationContext, use enriched version of javax.enterprise.event.Event or select javax.enterprise.inject.Instance based on java.lang.reflect.Type.

Notable fixes and improvements:

  • Weld Core:

    • Improved subclass generation mechanism for generic interceptors (WELD-2414)

    • Corrected proxy creation for signed classes (WELD-2425)

    • Correct InjectionPoint bean behaviour when used within AfterBeanDiscovery observer (WELD-2429)

  • Weld SE

    • There are now multiple convenient error-proof methods to quickly configure SE container (WELD-2426)

      • Weld.enableDevMode(), Weld.scanClasspathEntries(), …​

  • Weld API/SPI

    • WeldInstance has several improvements

      • It now allows you to select() beans based on java.lang.reflect.Type (WELD-2427)

      • WeldInstance.Handler had become lazy which means you can now iterate/filter/sort WeldInstance without actually instantiating beans (WELD-2258)

    • There is new interface in the API - WeldEvent - which can be used in place of well known Event but allows you narrow down event type by using select() with java.lang.reflect.Type (WELD-2427)

    • API now contains WeldInvocationContext, an enriched version of javax.interceptor.InvocationContext which allows to obtain interceptor binding (WELD-2433)

      • There is also a String key used to obtain interceptors binding directly from InvocationContext (WELD-2436)

      • In order to learn more, please refer to (our documentation)

  • Other

    • Probe - fixed NPE which might occur when bean had @Priority but no other annotation (WELD-2432)

    • All the API changes should now be documented within Weld docs

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.


Weld 3.0.2.Final

2017-11-23   release   Matej Novotny

Weld 3.0.2.Final is out and targetting WildFly 11! Ever wished you could select events and instances in a truly generic way using just java.lang.reflect.Type? Looking for easier way to configure SE container? We have a bunch of bugfixes and improvements for you, so read on…​

Notable fixes and improvements:

  • Weld Core

    • Improved subclass generation mechanism for generic interceptors (WELD-2414)

    • Fixed OSGi bundling, we missed out one package on last release (WELD-2421)

    • Improved behaviour with no-interface EJB view with non-public methods (WELD-2430)

    • Corrected proxy creation for signed classes (WELD-2425)

  • Weld SE

    • There are now multiple convenient error-proof methods to quickly configure SE container (WELD-2426)

      • Weld.enableDevMode(), Weld.scanClasspathEntries(), …​

  • Weld API/SPI

    • WeldInstance has several improvements

      • It now allows you to select() beans based on java.lang.reflect.Type (WELD-2427)

      • WeldInstance.Handler had become lazy which means you can now iterate/filter/sort WeldInstance without actually instantiating beans (WELD-2258)

    • There is new interface in the API - WeldEvent - which can be used in place of well known Event but allows you narrow down event type by using select() with java.lang.reflect.Type (WELD-2427)

    • API now contains a String key used to obtain interceptors binding from InvocationContext (WELD-2436)

  • Other

    • Probe now correctly recognizes beans which have @Priority but aren’t alternatives (WELD-2432)

    • Multiple documentation improvements regarding all things, old and new (WELD-2440, WELD-2431, WELD-2434)

WildFly Patch

As usual, there is a patch for WildFly 11.0.0.Final is available.

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


Weld 2.4.5.Final

2017-9-11   release   Matej Novotny

It’s about time we delivered another regular bugfix release for Weld 2. And while the list of fixes isn’t exhausting, some of them are quite crucial.

Notable fixes and improvements:

  • Weld Core:

    • Revise Java 8 default methods plus proxies/sublasing behaviour (WELD-2407 and WELD-2405)

    • All POMs in Weld core project should now have correct MIME types; this corrects issues with Nexus 3 (WELD-2417)

    • Proxies for signed packages should now be generated in custom packages (WELD-2402)

    • The behaviour of Weld Core and integrator provided implementation of org.jboss.weld.bootstrap.api.Environment is back to what it was in Weld 2.4.3.Final (WELD-2401)

      • We found out this change could cause serious headaches to integrators so we will leave it as it is - sorry for the mess

      • For Weld 3, we already have a better solution in place

  • Weld SE and Servlet

    • Both, Weld SE and Weld Servlet, will now explicitly bring in dependency on jboss-classfilewriter 1.2+ (WELD-2406)

  • Other

    • Under the jboss-as directory of Weld source code, you can now make use of new profiles to create WildFly patches yourself WELD-2397

WildFly Patch

As usual, a patch for WildFly 10.1.0.Final is available. But since WildFly 11 has already reached CR stage, we have decided to also provide you with patch for WildFly 11.0.0.CR1. If you’re not familiar with patching WildFly, check the FAQ.


Weld 3.0.1.Final

2017-8-25   release   Matej Novotny

Weld 3.0.1.Final is out and it brings some bugfixes as well as new version of Weld API - 3.0.SP1. Among the new things you can find sweet stuff such as an expansion to CDI 2 BeanConfigurator API or the ability to detect that injected object is Weld proxy. Wait, not only detect - you can also use it do get Metadata or even retrieve the actual contextual instance hidden beneath. So let’s see the summary of fixes and improvements, shall we?

Notable fixes and improvements:

  • Weld Core

    • Revised support for Java 8 default methods (WELD-2407 and WELD-2405)

    • Corrected MIME types for all POMs in Weld core - Nexus 3 will love us now! (WELD-2417)

    • Fixed how proxies are created for signed packages (WELD-2402)

    • Portable extension events should now be fired in accordance with specification WELD-2393

  • Weld SE

    • Synthetic bean archive can now have discovery mode annotated (WELD-2386)

    • Added a convenient static method WeldContainer.current() allowing you to quickly grab your running instance (WELD-2399)

    • Fixed a glitch when starting SE container and adding packages via Weld.addPackages() WELD-2395

  • Weld API/SPI

    • Added a way to detect proxies and subclasses (WELD-2407)

      • Every Weld-enhanced object (subclass/proxy) will now implement new marker interface(s) which grant access to additional data about the bean

      • This also allows to retrieve the underlying contextual instance

    • Added WeldBeanConfigurator to API - allows to select an @Alternative which was created using BeanConfigurator (WELD-2412)

    • We have enhanced the Environment in Weld SPI so that integrators define whether their bean archives are "EE module aware" or not (WELD-2398)

  • Other

    • Under the jboss-as directory of Weld source code, you can now make use of new profiles to create WildFly patches yourself WELD-2397

    • Weld SE and Weld Servlet now explicitly depends on jboss-classfilewriter in version 1.2+ WELD-2406

WildFly Patch

As usual, there is a patch for WildFly 10.1.0.Final is available.

But, for those of you who like to stay sharp, we have also created a patch for WildFly 11.0.0.Beta1.

Please note that there is currently a known issue with security context propagation in Weld 3 for WildFly 11. Though this should only concern people who use the combination of Elytron subsystem and asynchronous CDI events.

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


Weld 2.4.4.Final

2017-6-14   release   Matej Novotny

We have been busy chasing down some annoying little bugs and it’s high time you got the fruits of those efforts into your hands. Say hello to Weld 2.4.4.Final.

Notable fixes and improvements:

  • Weld Core

    • Fixed bean discovery event ordering when processing producers (WELD-2393)

    • Eliminated an NPE for a corner case with abstract decorator (WELD-2273)

    • Corrected @Initialized(RequestScoped.class) event firing in @PostConstruct callbacks (WELD-2372)

    • Fixed BeanManager.isStereotype() behavior when checking a qualifier annotated with yet another qualifier (WELD-2390)

  • Weld SE

    • Added a convenience static method WeldContainer.current(), a shortcut for CDI.current() with no need to cast the result (WELD-2399)

    • Allowed to specify bean discovery mode for synthetic archives (WELD-2386)

    • Fixed bean class discovery problem when adding whole packages (WELD-2395)

  • Weld Servlet

    • Improved logging and make checks more lenient in case the container is not yet bootstrapped (WELD-2382)

  • Configuration options

    • In SE and Servlet environments, Jandex can now be forcibly prohibited from processing your archives. This is useful when a third-party dependecy brings in some unsupported Jandex version (WELD-2374)

  • Development tools

    • If a deployment validation fails and the development mode is enabled, a simple validation HTML report (which contains a lot of useful information) is generated

      • Users are encouraged to always attach this report when asking a question on the mailing list or any other communication channel

WildFly Patch

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


Weld 3.0.0.Final - the first implementation of CDI 2.0!

2017-5-15   release   Martin Kouba

I am very pleased to announce the release of Weld 3.0.0.Final - the first implementation of CDI 2.0! I would like to thank not only to everyone involved in this particular release but also to the Weld community as a whole and also to all active CDI EG members who invested a lot of energy into the specification process!

/**
     * TODO: Continue to deliver bugfixes and improvements
     */
    public class WeldTeam extends OpenSourceCommunity {
    
      @Inject
      @AwesomeNews
      Event<String> event;
    
      public void release() {
        // Fire asynchronously so that we don't need to wait for observer notification before we start celebrating!
        event.fireAsync("CDI 1.2 is dead, long live CDI 2.0!");
        celebrate();
      }
    
    }
Note
Weld 3 is an IMPORTANT MILESTONE. Therefore, we’re preparing a special blogpost summarizing all the important stuff that was added. Expect the Tour around Weld 3 blogpost within a few days.

Let’s sum up the notable changes since 3.0.0.CR2:

  • Weld defines two non-portable notification options to configure the notification of asynchronous observer methods (see also Notification options for more info):

    • weld.async.notification.mode - the notification mode, possible values are: SERIAL (default) and PARALLEL

    • weld.async.notification.timeout - the notification timeout (in milliseconds) after which the returned completion stage must be completed.

      • If the time expires the stage is completed exceptionally with a CompletionException holding the java.util.concurrent.TimeoutException as its cause

      • The expiration does not abort the notification of the observers

  • Session replication - handle situation when HTTPSessionBean might not be serializable (WELD-2346)

  • Fire @Initialied(RequestScoped.class)/@Destroyed(RequestScoped.class) events for a @PostConstruct callback if the request context was activated for the specific callback

  • Weld SE

    • It’s possible to easily register a org.jboss.weld.bootstrap.api.Service during container bootstrap (WELD-2360)

    • Any javax.enterprise.inject.spi.CDI method can now be called during AfterDeploymentValidation (WELD-2371)

    • ContainerInitialized and ContainerShutdown now implement toString() (WELD-2354)

  • Weld Servlet

    • Fixed usage of Jandex on Tomcat when using unpackWars=false (WELD-2357)

  • Added option to disable Jandex in Weld SE and Weld Servlet (WELD-2374)

  • Development tools

    • If a deployment validation fails and the development mode is enabled a simple validation HTML report (which contains a lot of useful information) is generated

      • Users are encouraged to always attach this report when asking a question on the mailing list or any other communication channel

  • Updated documentation and migration notes for integrators

  • Examples cleanup (dropped GAE support, etc.)

WildFly Patch

As usual, a patch for WildFly is available. This time the target platforms are WildFly 10.1.0.Final and WildFly 11.0.0.Alpha1. If you’re not familiar with patching WildFly, check the FAQ.


Weld 2.4.3.Final

2017-4-7   release   Matej Novotny

Even as we get ever closer to CDI 2.0 final version, we shan’t forget about our stable 2.4 branch. Ladies and gentlemen, here comes the next-in-line 2.4 release - Weld 2.4.3.Final!

Notable fixes and improvements:

  • Weld now shares proxy classes for built-in beans of the same type (WELD-2344)

  • Fixed usage of Jandex on Tomcat when using unpackWars=false (WELD-2357)

  • Weld now supports wider variety of non-portable extension observer methods (WELD-2338)

  • There is now new debug level logging during bootstrap which allows to monitor name, start, end and duration of all bootstrap phases (WELD-2336)

  • Session replication

    • Built-in session and conversation scoped beans are not part of the bean identifier index anymore (WELD-2343)

    • Handle situation when HTTPSessionBean might not be serializable (WELD-2346)

  • Weld SE

    • You can now easily register new org.jboss.weld.bootstrap.api.Service during container bootstrap (WELD-2360)

    • Any javax.enterprise.inject.spi.CDI method can now be called during AfterDeploymentValidation (WELD-2371)

    • ContainerInitialized event is now correctly fired after registration of shutdown hook (WELD-2340)

    • ContainerInitialized and ContainerShutdown now implement toString() (WELD-2354)

  • Probe development tool

    • Allow monitoring of bean instance creation using AroundConstruct (WELD-2332)

    • Fixed a situation when bean was wrongly marked as unused when injected as parameter (WELD-2342)

See also the release details. Thanks to everyone involved in this release!

WildFly Patch

As usual, a patch for WildFly is available. This time the target platform is WildFly 10.1.0.Final. If you’re not familiar with patching WildFly, check the FAQ.