The creator of Apache Maven. Jason is a DZone MVB and is not an employee of DZone and has posted 10 posts at DZone. You can read more from them at their website. View Full User Profile

Guicing Up Hudson: Making Life Easier for Developers with JSR-330

  • submit to reddit

Today we started rolling out the first of our proposed JSR-330 Dependency Injection changes to Hudson back into the Hudson community. We’re giving it back because we think it is going to make a huge difference for Hudson’s future development. As more and more libraries move to JSR-330, we’re going to see a lot of possibilities open up because of these changes. With today’s donation, we’re making it easier to extend Hudson, we’re reducing the effort required to write a Hudson plugin, and we’re helping to put in a new foundation for the next level of Hudson interoperability and performance.

What does this mean for you as an end-user?

Guice is emerging as a lightweight Dependency Injection standard. We’ve moved the core of Maven to Guice over the past two years and it has dramatically increased performance and opened up possibility for integration with other tools and libraries. Since Guice is implementing JSR-330 standards, what we’re really doing with this effort is moving Hudson to a more standard, more maintainable architecture. As an end-user, you will likely notice increased stability as the core becomes more modular, easier to maintain and test. You should also expect greater integration with other tools that can speak the JSR-330 standard. This includes components that use both Guice and the Spring Framework.

Our Plan for JSR-330 Integration Going Forward

We’ve been working on decoupling both our JSR-330 and JAXRS work from our commercial version of Hudson for a couple of months. Our current focus is to allow Hudson plugins to take advantage of the JSR-330 Dependency Injection standard and then work toward using JSR-330, via Guice, in the core of Hudson itself. We have opened the Github repository containing the Hudson JSR-330 work which also contains a small example of a [Hudson Plugin written using JSR-330].

We’ve been using this new Hudson JSR-330 mechanism to create our JAX-RS (RESTful Web) integration, and our Maven 3.x integration. We will be working as fast as we can to propose and deliver our JSR-330 integration, JAX-RS integration, and our Maven 3.x integration back to the Hudson Community. Stuart McCulloch, who has been working on our Guice strategy, will be doing this work and following up with proposals on the Hudson Development list. Jeanfrancois Arcand is working on a REST framework, based on Jersey, that we will be proposing for integration into Hudson which is how we see webservices working in Hudson going forward.

Our GWT-based UI for our Maven integration relies upon these REST services, and our GWT-based Maven 3.x builder also uses JAX-RS as a communication channel back to the server. While it is unlikely that we will be able to stop using Jelly completely in the near future, this work will set the stage for a Hudson that is based entirely on RESTful web services. This isn’t easy work, we’re trying to set the foundation for future UI while maintaining compatibility for plugins that continue to use Jelly. Jeanfrancois is also looking at the integration of Atmosphere to make the standard pages in Hudson more efficient with respect to communication to the server.

So this is just the start of what we said we would deliver. More pieces will be released as they are ready. If you are interested, please take a look at the JSR-330 integration work we’ve done and look forward to more posts about JSR330 next week! If you have any feedback, please provide your comments or email questions. We’re excited about the work that has been done and the work yet to come.



Published at DZone with permission of Jason Van Zyl, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)



Jonathan Fisher replied on Fri, 2011/02/11 - 9:09am

Can someone explain why cdi and jsr330 both exist? Seems life they do the same thing... Does the weld project do anything with jsr330?

Ludovico Fischer replied on Fri, 2011/02/11 - 12:12pm

CDI is kind of a superset of JSR 330.

cowwoc replied on Fri, 2011/02/11 - 4:39pm

This article reads like a long list of meaningless buzzwords. JSR-330 and DI in general does not magically make code faster. It's all about a programming design, not about performance improvements. Nor do I understand how DI is useful to end-users of Hudson. Who cares?

Jonathan Fisher replied on Sat, 2011/02/12 - 9:44am in response to: Ludovico Fischer

Thanks, I found a pretty good reference on wikipedia... Hopefully jsr 330 can be used toreduce the bloat... I'm really glad sonatype is getting involved too, nexus is pretty awesome.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.