The Spring Blog

Engineering
Releases
News and Events

Spring Web Flow Bean Scopes and JSF

I’ve recently finished up an interesting issue in Spring Web Flow. This issue (SWF-163) dealt with adding Spring 2.0 bean scoping support for Spring Web Flow’s internal scopes. The implementation isn’t really that interesting (the Scope interface is pretty easy to implement after all), but I wanted to mention exactly how you would use something like this in your application.

Spring 2.0 Scoping

In Spring 1.x, we had the idea of singleton and prototype bean scopes, but the notation was fixed and not especially descriptive with singleton=“[true | false]”. So in Spring 2.0, this notation was removed from the XSD style of configuration and now you see a notation that is more clear with scope=“[singleton | prototype | …]”. Spring itself adds three more bean scopes; request, session, and globalSession which are related to web applications.

Read more...

Spring Batch

Introduction

I’ve been working hard with a couple of clients on a new product called Spring Batch. The aim is to provide tools and applications to support bulk processing in an enterprise environment. Spring Batch is part of the Spring Portfolio with an initial release in the Spring 2.1 release train.

The original impetus to build some prototype code actually came independently from a number of Interface21 clients. This provides some useful additional detail and some constraints on the implementation so that it can be applied to the real-world problems posed by the clients. I hope that this article will stimulate some more interest and provide feedback on the general approach.

Read more...

Power Combination: SCA, OSGi, and Spring

No, that’s not my headline, it’s actually the title of a white paper recently published by Open SOA collaboration. To quote from the news announcement accompanying the whitepaper:

“Based upon user feedback, the OSOA Collaboration are publishing a white paper highlighting the powerful combination of the SCA, Spring and OSGi technologies aimed to help Developers simplify the creation and composition of services critical to building applications based on an SOA approach.”

partners

The white paper provides a short overview of SCA, OSGi and Spring, and then describes how they can be used together. Quoting from the summary:

Read more...

Querying and Downloading from Amazon S3

In a previous post, I described how we use a custom ANT task to upload nightly snapshots from the ANT based projects in the Spring portfolio. In this post I’ll describe how we use Amazon S3 to generate pages for the snapshots from each project and allow users to download the snapshots.

As I mentioned in the previous post, S3 is primarily used as a REST-ful service. This means that while I used Java for the upload portion, I was free to use other languages for the download portion. I chose to use PHP in this case because it was already available on the server I was working with, and was the path of least resistance.

Read more...

Uploading to Amazon S3 using a custom ANT task

One of the interesting side effects of a solid CI structure is that when things are running reliably, new problems start to crop up. Shortly after Spring’s CI system started running smoothly, our occasional space and bandwidth issues on static.springframework.org became more pronounced. Colin Sampaleanu had done research earlier on how to alleviate some of these problems and had settled on Amazon S3.

Amazon S3 is part of the Amazon Web Services umbrella and provides an incredibly cheap online file storage service. What does ‘incredibly cheap’ mean? Well, from the website, it appears that 1 GB*month of storage costs US$0.15 and 1 GB of bandwidth costs US$0.20. Add to that, a high-bandwidth transparent mirroring service, and S3 becomes very appealing for storing our nightly snapshots. On a tangent, Amazon actually uses the exact same infrastructure internally, so you know that there is a team of admins guaranteeing their five 9’s promise.

Read more...

The Essence of Spring

This happened in Atlanta last week while I was in a Barnes & Noble bookstore. I circled around to the computer section and began scanning titles. With my head tilted I overheard a conversation about a job. I wasn’t actively listening but I knew one side was pitching a job while the other was inquiring about it.

A couple of minutes later it was just me and the guy who was looking for talent. I was sure he would start speaking. Soon after he said ‘so you’re in J2EE?’ and so the conversation began. He asked me about my work. He didn’t know about Interface21 but upon hearing it’s the company behind Spring his face lit. He said he hadn’t tried Spring yet and then added he was currently using Struts.

Read more...

XPath Support in Spring Web Services

Following up on my post on WS-DuckTyping, I thought it would be interesting to show what support Spring Web Services offers for XPath. Some of these features are available right now, but most will be part of the RC1 release we will release later this month. Throughout this post I will be using the contacts xml file defined in item 35 of Effective XML, by Rusty Harold.

XPathExpression

One of the options that has been available for quite a while is the XPathExpression. This is an abstraction over compiled XPath expressions, such as the Java 5 XPathExpression, and Jaxen XPath.

Read more...

What Spring Web Flow Offers JSF Developers

Spring Web Flow, much like the Spring Framework itself, is a unique integration technology. Most of our users view it as a generic ApplicationController that can be embedded in any environment. We support Servlet and Portlet based applications, and ship integration with the leading web frameworks Struts, Spring MVC, and Java Server Faces. There are even teams I know of using Spring Web Flow in a Flex environment. In each of these environments, Spring Web Flow integrates to provide a better model for implementing navigation logic and managing application state.

Read more...

Spring Project CI Builds

Over the last couple of weeks, fellow i21 employee Costin Leau and I have been working on improving the Continuous Integration processes of the Spring projects. When we started, we had separate builds running in Cruise Control, Continuum, and even a custom cron job. We were having some trouble getting any of our existing tools to give us what we wanted on all of the builds, when both Costin and I independently came upon Atlassian’s new product Bamboo.

In about 10 minutes we had the Spring CI build up and running. This might not sound like much, but due to its size Spring doesn’t play nicely with some build servers. So you can imagine our joy when the Spring build started kicking off reliably any time Juergen checked in a change. From there it was just a matter of setting up all the rest of the Spring projects to build as well. I’ve got to say, having done this kind of thing for a number years, I’ve never had CI builds start up so easily.

Read more...

So what's the deal with Spring-OSGi?

Welcome to my blog!
This is my first entry…ever. I manage to resist the urge of blogging but since so many people encouraged me to write about what I do at i21 I decided to give it a go. This and the fact that the Spring-OSGi had its first release yesterday evening (EET time zone).

I’ve been involved with Spring-OSGi since August last year and it has been quite a ride. It’s one of the most challenging projects I have worked on and I’m glad to have it released, even as a milestone, to the public. Thanks a lot to everybody involved for making this happen, especially my team mates - Adrian, Andy and Hal!

Read more...