Red Hat

In Relation To Weld

In Relation To Weld

Weld 2.0.1.Final

Posted by    |       |    Tagged as Weld

Weld 2.0.1.Final has been released. This is mainly a bug-fixing release with 20 issues fixed since the previous one. For details, see the release notes.

Our focus is now shifting towards WildFly and its Weld integration in order to provide a CDI 1.1 compliant container. For details about CDI 1.1, see Pete's blog post. Furthermore, we plan frequent releases of Weld to continue, so expect another release in early July at the latest!

[ Distribution ] [ Release notes ] [ Documentation ] [ CDI 1.1 Javadoc ]

Weld 2.0.0.Final released

Posted by    |       |    Tagged as Weld

I am pleased to announce the release of Weld 2.0.0.Final, the reference implementation of Contexts and Dependency Injection for Java EE 1.1 (JSR 346). For a list of major changes in CDI 1.1 see the specification.

The reference implementation will soon be available in GlassFish 4 and WildFly (formerly JBoss Application Server). In the meantime you can check snapshots of the application servers.

As always, Weld artifacts can be obtained from maven or you can use a distribution bundle.

Along with the Weld release comes the final release of the Technology Compatibility Kit (TCK) for CDI 1.1. Martin Kouba did an excellent job writing new tests and keeping the TCK in sync with the almost never-ending stream of specification changes. The TCK splits the specification into 1550 testable assertions out of which 96.71% is covered by TCK tests.

I would like to thank to everyone who lent a hand and helped delivering these releases, especially: Martin Kouba, Pete Muir, Marko Lukša, Stuart Douglas, Marek Schmidt, Ron Šmeral, Tomáš Remeš, JJ Snyder, Phil Zampino, Tomaž Cerar, Hardy Ferentschik, Lincoln Baxter III, Matúš Abaffy and others.

[ Distribution (Weld, CDI TCK)] [ Documentation (Weld, CDI TCK)] [ Javadoc (CDI 1.1, Weld SPI)] [ Issue tracker]

Weld 2.0.0.Beta3

Posted by    |       |    Tagged as Weld

Weld 2.0.0.Beta3 has been released. This is another step towards CDI 1.1 but mainly a bug fixing release. As promised, the reference guide has been updated to reflect recent changes in Weld. See the release notes for details.

[ Distribution (Weld, CDI TCK)] [Release notes (Weld, CDI TCK)] [ CDI 1.1 PRD Javadoc ]

Weld 2.0.0.Beta2 released!

Posted by    |       |    Tagged as Weld

The 2.0.0.Beta2 release of Weld comes less than a month after the previous release. We planned a spin this short to give you a chance to try out the CDI 1.1 preview implementation before going away for the winter break. Several bugs have been fixed. In addition, this release implements the latest changes in the CDI 1.1 specification (see the release notes for details).

JBoss AS

It's easy to upgrade your existing JBoss AS 7 installations with Weld 2. Check the installer (packaged within the distribution bundle) and follow the instructions. You'll need JBoss AS 7.1.1.Final or better.

Happy Holidays Everyone!

[ Distribution (Weld, CDI TCK)] [Release notes (Weld, CDI TCK)] [ CDI 1.1 PRD Javadoc ]

Weld 2.0.0.Beta1

Posted by    |       |    Tagged as Weld

Weld 2.0.0.Beta1 has been released. Weld 2 is the reference implementation of CDI 1.1. This release implements the Public Review Draft of CDI 1.1. You can read more about the CDI draft in Pete’s blog post.

Out of the large number of changes that the draft introduces, I would highlight the following:

Global enablement and ordering of interceptors, decorators and alternatives

An often misunderstood and disliked part of CDI is enablement of interceptors, decorators and alternatives. CDI 1.0 requires each interceptor / decorator / alternative to be explicitly enabled in each bean archive where it should be used.

CDI 1.1 enhances this concept and provides a way of enabling interceptors, decorators and alternatives globally. Such globally enabled component is only defined in a single bean archive and defines a priority which determines its global ordering. Lower priority interceptors and decorators are called first. For alternatives, if there are multiple enabled alternatives matching the same injection point, the alternative with higher priority wins.

    <class priority="100">org.mycompany.myfwk.TimestampLogger</class>
    <class priority="200">org.mycompany.myfwk.IdentityLogger</class>

Alterable contexts and explicit dependency destruction

CDI 1.1 adds an ability to save resources by destroying existing contextual instances. On the SPI part the AlterableContext interface is introduced which exposes the destroy() operation. If a contextual reference is accessed after the underlying instance has been destroyed, a new instance is transparently initialized by the CDI container.

Furthermore, the built-in Instance bean now exposes a destroy() operation which can be used for:

  • releasing dependent instances obtained using Instance
  • destroying normal-scoped instances (a shortcut to the SPI approach above)

Decoration of built-in beans

The realm of decorators has been expanded to support decoration of CDI built-in beans. The following built-in beans support decoration:

  • Event
  • Instance
  • Conversation
  • HttpServletRequest / HttpSession / ServletContext
  • InjectionPoint
  • Principal
  • UserTransaction

The hottest candidates for new extensions are Event (event ordering) and Conversation (conversation begin/end events)

Filtering of ProcessAnnotatedType events based on annotations present

CDI 1.1 introduces the @WithAnnotations annotation. This annotation can be used on extension observer methods to more precisely specify the events an observer method is interested in.

void observeTypesWithInject(@Observes @WithAnnotations(Inject.class) ProcessAnnotatedType<?> event) {
    // TODO: process types

In the example above the extension observer method is only notified of AnnotatedTypes which define the @Inject annotation. The specified annotation can appear on the type or any supertype, on any field, method or constructor declared by the type or a supertype, or on any parameter of any method or constructor declared by the type or a supertype. The annotation may be applied as a meta-annotation on any annotation considered.

This allows for both simpler implementation of CDI extensions and faster CDI containers as the additional information exposed via @WithAnnotations allows containers to perform bootstrap optimizations.

Besides implementing the specification changes, this release also fixes more than 30 bugs. We also worked on Weld’s performance. Bootstrap performance of large deployments is now significantly better and we also tuned runtime performace of CDI-bound interceptors a bit.

As always, this release is accompanied with a CDI TCK release with tests for the new CDI 1.1 features.

UPDATE: There is no ready-made AS7 distribution this time. Instead, the Weld bundle contains an installer that you can use to patch any existing JBoss AS 7.1.1.Final or better with Weld 2. Just follow the instructions in the readme file.

Give Weld 2 a try and give us feedback. Note that CDI 1.1 is not yet final so if you do not like something in CDI there’s still time to improve it!

[ Distribution (Weld, CDI TCK)] [Release notes (Weld, CDI TCK)] [ CDI 1.1 PRD Javadoc ]

Not one, two Weld releases - 1.1.10.Final and 1.2.0.Beta1 !!

Posted by    |       |    Tagged as Weld

I’m super happy to finally announce official Weld-OSGi release; again big thanks to Serli guys!

After a series of not so trivial merges and rebases, mvn poms fixing and small code tweaks, it is finally here, as part of Weld 1.2.0.Beta1 release.

We also released Weld 1.1.10.Final, which includes a few tricky bug fixes.

e.g. recent tests on both sides - JBossAS and GlassFish - show we (hopefully) finally got beans closure (aka visibility) right

All artifacts are available in our JBoss Nexus repository.

While version 1.1.10.Final should be a drop-in replacement for any JBossAS7, you’ll have to wait a bit for a full AS integration with version 1.2.0.Beta1 -- due to Weld API changes. But that shouldn’t stop you from trying out the new OSGi module.

I suggest looking at Weld-OSGi vast number of tests and examples for the actual usage, or check Mathieu' presentation from London' JUDCon.

Any feedback welcome as always!

Weld 2.0.0.Alpha3

Posted by    |       |    Tagged as Weld

Weld 2.0.0.Alpha3 has been released. This is purely a bugfixing release with more than 30 issues resolved. For a complete list of changes, see release notes. This release also comes along with and updated TCK for CDI 1.1.

[ Distribution (Weld, CDI TCK) ] [ JBoss AS 7.1.1.Final with Weld 2.0.0.Alpha3 ] [Release notes (Weld, CDI TCK)] [ CDI 1.1 EDR1 Javadoc ]

Fixing decorators validation - Weld 1.1.8.Final

Posted by    |       |    Tagged as Weld

Finally Labour day holidays came to an end, and I'm happy to announce we did a new Weld release during the holidays (thanks Stuart!)

We (me) over did it a bit on Decorators validation, which showed in increased deployment time. So this release mostly addresses this issue.

But we also fixed a few other pesky issues.

Feedback welcome as always!

Weld 2.0.0.Alpha2 released

Posted by    |       |    Tagged as Weld

Weld 2.0.0.Alpha2 has just been released. Weld 2 is an implementation of JSR-346 (CDI 1.1). The highlights of the new version are:

  • Significant improvement of memory usage. Our benchmarks show that the memory footprint of Weld 2 has been reduced by 50 - 80% compared to Weld 1. This has been achieved mostly by rewriting the metadata layer and separating metadata needed for Weld bootstrap from metadata used at runtime.
  • Concurrent bean deployer and bean validator. These two components speed up Weld bootstrap by leveraging capabilities of multi-core CPUs. The bootstrap time improvement is most significant in large deployments. We plan on reducing bootstrap time even more in future releases.
  • Stuart removed the Javassist dependency entirely and switched to jboss-classfilewriter
  • Around 30 bug fixes, mostly picked from the 1.x branches (most of the credit here goes to Stuart, Ales and Marko)

Furthermore, a new version of the CDI 1.1 TCK has been released. The TCK currently provides a solid coverage (90.60%) of the JSR-346 Early Draft

[ Distribution (Weld, CDI TCK) ] [ JBoss AS 7.1.1.Final with Weld 2.0.0.Alpha2 ] [Release notes (Weld, CDI TCK)] [ CDI 1.1 EDR1 Javadoc ]

Weld 1.1.7.Final Released

Posted by    |       |    Tagged as Weld

Hot on the heels of Weld 1.1.6 we have released Weld 1.1.7.Final. This release has only a few minor changes, mainly performance improvements, especially in the area of observer method resolution. Due to community feedback we have also relaxed the stricter checking of interceptor method signatures that were introduced in 1.1.6.

back to top