I am leading the CDI 1.1 specification, and work on JBoss Developer Framework, a set of tutorials and examples for all JBoss users. Previously, I've worked on Infinispan and I led the Seam and Weld projects, and am a founder of the Arquillian project. I've worked on a number of specifications including JSF 2.0, AtInject and Java EE 7. I am a regular speaker at JUGs and conferences such as JavaOne, Devoxx, JAX, JavaBlend, JSFDays, JBoss World, Red Hat Developer Day and JUDCon. I am currently employed by Red Hat Inc. working on JBoss open source projects. Before working for Red Hat, I used and contributed to Seam whilst working at a UK based staffing agency as IT Development Manager.
There were a number of comments on twitter and blogs last week discussing Weld's performance and scalability, and I wanted to comment on the issues discussed and our work to resolve them. Upfront, let me say that we have been actively working on performance and scalability for a while now (previously more on memory usage, more recently on performance). Of course, we work primarily with JBoss AS, but also work closely with the GlassFish team; many of the improvements will be directly available as Weld is updated in GlassFish, and we'll continue to support the GlassFish team in any performance work they do on GlassFish that impacts on Weld.
To understand why we didn't release Weld 1.0 with excellent performance and scalability (I would have loved to, of course!) it's worth mentioning a few points. Firstly, Weld was one of entirely new RI's in Java EE 6 (the others being Hibernate Validator and Jersey), and of these is perhaps the biggest, and certainly the most integrated into other parts of Java EE. Secondly, the deadline for the Java EE 6 release (and hence the final release of it's RIs) was very tight (with the CDI spec still undergoing major overhauls up until about 3 weeks prior to the Weld 1.0 release). Thirdly, this was the first release of Java EE that included RIs not produced by Sun, which were fully open source (spec, RI and TCK) which led to the obvious scheduling issues you have when two different teams work together, as well the need to invent new infrastructure (e.g. for running the TCK).
All of these factors together meant that the 1.0 release of Weld primarily focused on being feature-complete to the CDI spec, with 1.0.1 focusing again on resolving functional issues. 1.1.0 is our chance to review the architecture of Weld and investigate both memory usage and performance, and deliver something that will shine.
If you have concerns about performance or memory usage, and want to help us work on this, we have batteries of stress tests we can run, so you can concentrate on looking for improvements.
We'll be including Weld 1.1.0 in JBoss AS 6.0.0, and we are recommending to the GlassFish team that they include it in GlassFish 3.1.
Finally, of course if you come across issues, you should file them in the issue tracker, or better yet, take a look at the source and see if you can help out!
What with just getting back from vacation, I forgot to post that I will be speaking tomorrow (Thursday 10th) evening in Belgium on CDI, Java EE 6 and Arquillian as a guest of the Belgium JBoss User Group. More here.
See you there!
Lincoln Baxter and Mike Brock have been working away on our next generation RAD tooling for rapidly scaffolding applications. Seam Forge is different because it allows anyone to interact with the project via plugins written using CDI.
Lincoln gave a great overview of progress and architecture at the Seam development meeting today. We captured the presentation, so if you are interested in tooling for Seam 3, or looking to add a project generation for your framework (due to the extreme pluggability, Seam Forge can be adapted to generate projects for anything), then you should check out the recording!
Stuart released a couple of Seam 3 modules -- XML and Persistence over the weekend. Check out his blog.
Seam XML allows you to configure your CDI beans via XML - very useful and as it has pretty minimal dependencies (just the CDI API and the interceptors API) usable now. I know Stuart plans to move to an API complete beta very soon. You can check out the module page for more on the roadmap
This alpha of Seam Persistence brings JPA and JTA support to CDI outside of Java EE (Stuart has both working on Tomcat) as well as transactions for managed beans anywhere, conversation scoped persistence contexts, and Hibernate Search integration.
On Seam Persistence roadmap are tests for all containers, integration with Envers, easy manual flush mode control and more -- check out the module page
Weld Extensions is a portable library (licensed under the ASL 2) providing utilities and common functionality for CDI applications and libraries or frameworks based on CDI alike. We'll be using it as the base of Seam 3. It contains extensions to the core CDI programming model, typed logging (courtesy of JBoss Logging 3), managed resource loading and support for evaluating EL anywhere.
Finally, Weld Extensions has a number of CDI extensions to make configuration easier. Generic beans allow for groups of beans to be installed based on configurations, default beans allow you to automatically install a bean unless the user provides another, unwrapping producer methods allow you to manage the lifecycle of an object, and service handlers allow for automatically implemented beans.
This project wouldn't have been possible without Stuart Douglas, additionally thanks go to Shane Bryzak, Dan Allen and Nicklas Karlsson for their contributions.
The API in this release is considered stable (unless there are any critical issues) and there are no planned changes. Currently we are planning to tidy up some of the error handling for Beta2, and then move towards a Final release.
I've just got back from a great trip to Berlin. Aslak and I started off by heading to the Berlin JUG to talk about CDI, Java EE 6 and Arquillian, which Michael Schütz had organised with just one week notice. It was great to see such an engaged and informed audience, with people working in all areas of Java.
The next day JBoss held it's second Java Users and Developers Conference in East Berlin. We had an excellent turnout, and I managed to catch up with a lot of familiar faces, from the community and colleagues. I presented a session on the Seam 3 roadmap, and showed off a few of the modules we plan to include in Seam 3. I also demonstrated some of the cloud tooling that Max and team have been working on.
At the Hackfest that evening, I had a great discussion with Heiko (from the RHQ team) and Peter (a Seam/JBoss user and fellow countryman) with some great ideas on how to add monitoring to Weld and also make it easy to add monitoring to CDI based apps.
Next up, Devoxx :-)
Just a brief note to mention a couple of conferences where I'll be talking about Seam 3, and diving into how you can build rich apps taking advantage of some of the recent cloud technologies from JBoss (such as Infinispan and EC2 images). Next week you can catch me at JAXLondon on Tuesday at 11:45 AM.
I'll also be speaking at JUDCon in Berlin on Thursday 7th October at 16:30. The line up for JUDCon (Red Hat's developer orientated conference for developers) looks pretty good - of course, there are the obligatory Infinispan talks, an exposition of how to use CDI with GWT, an update on jBPM 5, and a chance to learn how use Arquillian to test apps in the cloud. It's one of the better value conferences out there at €132 for two full days - so go and register!
I'm very pleased to say that we have released the first beta of Weld 1.1.0, the reference implementation of JSR-299: Contexts and Dependency Injection for Java EE. It's based on the CDI 1.0 API. You can find direct download links at the bottom of this post or you can pull the artifacts from the JBoss Maven Repository.
Highlights from this release are:
- Ability to exclude classes from scanning and deployment as beans by Weld. You can configure this in beans.xml for the bean archive you are deploying:
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:weld="http://jboss.org/schema/weld/beans" xsi:schemaLocation=" http://java.sun.com/xml/ns/javaee http://jboss.org/schema/cdi/beans_1_0.xsd http://jboss.org/schema/weld/beans http://jboss.org/schema/weld/beans_1_1.xsd"> <weld:scan> <!-- Don't include GWT support if GWT is not installed --> <weld:exclude name="com.acme.gwt.**"> <weld:if-class-available name="!com.google.GWT"/> </weld:exclude> </weld:scan> </beans>
- The new Pastecode example, which shows off many of the new EJB 3.1 features in use with Weld
- around 60 bug fixes
- Some improvements to error reporting (with a lot more planned for Weld 1.1.0.Beta2)
- Unsafe instantiators (Nicklas will blog about this soon!)
- A new proxy layer (that doesn't suffer from the memory leaks that Javassist has)
- Improvements in memory usage, with more planned for Beta2
A couple of weeks back, we released 1.0.2.CR2 of the CDI TCK as well - you can find the links for it below :-)
JBoss Tools 3.2.M1 and later has got great CDI support - they've implemented around 60 validations (meaning you get that vitally important feedback about whether you made a mistake much earlier) and added content assist for EL in JSF, as well provided excellent integration with m2eclipse, meaning you can easily scaffold a new project, and then import it into Eclipse. Check it out
Weld 1.1.0.Beta1 will be included in the next release of JBoss AS 6.0; until then you are best off using a snapshot build of JBoss AS. We recommend you use this build, unless you want to live life on the edge!
There is great testing support via Arquillian, which allows you to test in Weld SE, a mocked out Java EE container, Tomcat or Jetty, as well as JBoss AS and GlassFish.
If you are just getting started, there are a few examples in the distribution to guide you (look for instructions in the reference guide, and each example has a readme.txt). If you are looking for help, try our user forums, or perhaps join us on IRC.