Here we are again with the next Alpha release of Weld 3.
This time there are no additional CDI 2.0 previews.
Instead, this release contains multiple performance improvements, enables
calls to be implemented simply with CDI interceptors and most importantly, it comes with
Why isn’t my field injected? Why isn’t my interceptor triggered? What extensions do third-party libraries register?
Have you ever found yourself asking a similar question? Making Weld developer-friendly and helpful in troubleshooting is our priority. Yet, similar problems still occur sometimes.
But we can do event better! In Alpha4 of Weld 3 we are introducing a new tool called Weld Probe. Probe is a built-in tool that provides a detailed view into internals of a CDI application. Weld Probe has a web UI and is provided out-of-the-box.
Probe makes it easy to inspect:
beans, their properties such as qualifiers, stereotypes and name
a graph of bean dependencies
observers and producers declared by beans
interceptors and decorators bound to a bean
information about current contextual instances
tracking of invocations and invocation trees
Plus more addons are planned in future.
To try probe all that needs to be done is to upgrade to Alpha4, enable the development mode and point your browser to the URL
of your CDI application plus
For more thorough overview of what Probe provides see Martin’s blog post or the reference documentation. You can play with Probe using this simple CDI application hosted on OpenShift. Just append /weld-probe to the URL.
Bear in mind that Probe is still work in progress and that this early preview may have defects here and there.
Implementing @Asynchronous using CDI interceptor
It is possible to implement a substitute for EJB
@Asynchronous method calls using CDI interceptors.
Arjan Tijms recently blogged about his solution
A similar one can be found in
Long story short: This would not work smoothly until now because of a limitation in Weld. This limitation is now gone in Alpha4.
This release integrates various runtime performance improvements mainly around bean instance construction, producer and observer method invocation.
Weld 3.0.0.Alpha5 is planned in 3 weeks time from now, with some more CDI 2.0 previews. We are going to continue releasing Alpha versions of Weld 3.0 roughly every 3 weeks until the early draft of CDI 2.0, which should happen sometime in March. At that point, we’ll move to Beta releases.