I work on the Weld project as a Software Engineer. In addition, I am leading the Seam REST module. Previously I worked in the QE part of the Seam team.

Location: Brno, Czech republic
Occupation: Software Engineer
06. Jun 2013, 12:44 CET, by Jozef Hartinger

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 ]

25. Apr 2013, 16:12 CET, by Jozef Hartinger

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]

01. Feb 2013, 09:52 CET, by Jozef Hartinger

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 ]

19. Dec 2012, 20:26 CET, by Jozef Hartinger

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 ]

03. Dec 2012, 14:54 CET, by Jozef Hartinger

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 ]

Showing 1 to 5 of 8 blog entries