<?xml version="1.0" encoding="UTF-8"?><feed
  xmlns="http://www.w3.org/2005/Atom"
  xmlns:thr="http://purl.org/syndication/thread/1.0"
  xml:lang="en"
  xml:base="http://www.springify.com/wp-atom.php"
   >
	<title type="text">Springify</title>
	<subtitle type="text">All about Spring</subtitle>

	<updated>2009-03-13T14:13:51Z</updated>
	<generator uri="http://wordpress.org/" version="2.3.1">WordPress</generator>

	<link rel="alternate" type="text/html" href="http://www.springify.com" />
	<id>http://www.springify.com/feed/atom</id>
	<link rel="self" type="application/atom+xml" href="http://www.springify.com/feed/atom" />

			<entry>
		<author>
			<name>Nils Wloka</name>
						<uri>http://www.springify.com</uri>
					</author>
		<title type="html"><![CDATA[Spring 3.0 and beyond]]></title>
		<link rel="alternate" type="text/html" href="http://www.springify.com/archives/19" />
		<id>http://www.springify.com/archives/19</id>
		<updated>2008-09-09T08:19:57Z</updated>
		<published>2008-09-09T08:19:57Z</published>
		<category scheme="http://www.springify.com" term="Spring Framework" /><category scheme="http://www.springify.com" term="Java" /><category scheme="http://www.springify.com" term="Java EE" /><category scheme="http://www.springify.com" term="jee" /><category scheme="http://www.springify.com" term="REST" /><category scheme="http://www.springify.com" term="Spring" /><category scheme="http://www.springify.com" term="Spring 3.0" /><category scheme="http://www.springify.com" term="Spring EL" /><category scheme="http://www.springify.com" term="SpringSource Seminar Day Linz" />		<summary type="html"><![CDATA[I know that I promised some more reports about SpringOne, but as so often, plans haven&#8217;t survived confrontation with reality. As compensation, I offer you the latest news about the upcoming Spring 3.0 release, fresh from the SpringSource Seminar Day in Linz (which I had the opportunity to attend to, as my employer, OPITZ CONSULTING, [...]]]></summary>
		<content type="html" xml:base="http://www.springify.com/archives/19"><![CDATA[<p>I know that I promised some more reports about SpringOne, but as so often, plans haven&#8217;t survived confrontation with reality. As compensation, I offer you the latest news about the upcoming Spring 3.0 release, fresh from the <a href="http://www.springsource.com/node/392">SpringSource Seminar Day in Linz</a> (which I had the opportunity to attend to, as my employer, <a href="http://www.opitz-consulting.de">OPITZ CONSULTING</a>, now SpringSource Premier Systems Integrator Partner, was one of the event&#8217;s sponsors). Please bear in mind that many of the new features still only exist as prototypes, so things can and probably will change before the final release. But now without further ado&#8230;</p>
<p><strong>Spring 3.0&#8230;</strong></p>
<p>Apart from the switch to Java 5 that I <a href="http://www.springify.com/archives/15">mentioned earlier</a>, the main new features of Spring 3.0 will revolve around the two areas of Spring EL (dubbed Unified EL++) and the Spring web modules. While I have already written <a href="http://www.springify.com/archives/16">a rather detailed roundup of the former</a>, I had a chance to get a glimpse at the upcoming usage of expression language within Spring bean definitions.</p>
<p><strong>Spring EL</strong></p>
<p>Having made a first appearance in Spring Web MVC, Spring EL is not entirely new. Nevertheless, the promotion of this feature to the Spring core will enable all modules to incorporate it into their functionality. Before I give you some examples regarding Spring XML configuration, let me explain what Spring EL will actually do.</p>
<p>Expressions will be evaluated relative to the context they appear in and can be used to address what J&uuml;rgen called implicit attributes of the respective contexts. Inside the definition of a session scoped bean, you will, for example, be able to reference session and request attributes. You will also be able to use system properties and fields of Spring-managed beans. The really interesting thing is, that, instead of binding early as BeanPostProcessors do, EL expressions will return the value available at bean instantiation time.</p>
<p>Now for the example:</p>
<div class="dean_ch" style="white-space: nowrap;">
<span class="sc3"><span class="re1">&lt;bean</span> <span class="re0">id</span>=<span class="st0">&quot;someBean&quot;</span> <span class="re0">class</span>=<span class="st0">&quot;com.springify.example.SomeClass&quot;</span> <span class="re0">scope</span>=<span class="st0">&quot;prototype&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;property</span> <span class="re0">name</span>=<span class="st0">&quot;someProperty&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;#{anotherBean.anotherProperty}&quot;</span> <span class="re2">/&gt;</span></span><br />
<span class="sc3"><span class="re1">&lt;/bean<span class="re2">&gt;</span></span></span></p>
<p><span class="sc3"><span class="re1">&lt;bean</span> <span class="re0">id</span>=<span class="st0">&quot;anotherBean&quot;</span> <span class="re0">class</span>=<span class="st0">&quot;com.springify.example.AnotherClass&quot;</span> <span class="re2">/&gt;</span></span><br />
&nbsp;</div>
<p>The current value of anotherBean&#8217;s anotherProperty will be injected at someBean&#8217;s creation time, i.e. every time someBean is accessed, as its scope is set to prototype.</p>
<p>Similar functionality will also be provided by means of annotation configuration. The examples from the presentation sported the syntax&#8230;</p>
<div class="dean_ch" style="white-space: nowrap;">
@<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AComponent+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Component</span></a><br />
<span class="kw2">public</span> <span class="kw2">class</span> SomeBean <span class="br0">&#123;</span><br />
&nbsp; <br />
&nbsp; <span class="kw2">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> someProperty;<br />
&nbsp; <br />
&nbsp; @Value<span class="br0">&#40;</span>#<span class="br0">&#123;</span>anotherBean.<span class="me1">anotherProperty</span><span class="br0">&#125;</span><span class="br0">&#41;</span><br />
&nbsp; <span class="kw2">public</span> <span class="kw4">void</span> setSomeProperty<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> someProperty<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw2">this</span>.<span class="me1">someProperty</span> = someProperty;<br />
&nbsp; <span class="br0">&#125;</span><br />
&nbsp; <br />
<span class="br0">&#125;</span><br />
&nbsp;</div>
<p>&#8230;, in this case providing a dynamically bound default value for someProperty.</p>
<p><strong>REST support for Spring Web MVC</strong></p>
<p>I&#8217;ve already blogged about the <a href="http://www.springify.com/archives/16">upcoming REST support</a>, so I will only give you a quick overview of what&#8217;s new. Apparently, there&#8217;s now a consensus about how requests for different representations will be handled. As mentioned before, both accept headers and file name extensions will be evaluated. The actual functionality will be implemented on top of Spring Web MVC well know view resolution mechanism, complete with new View types for the most commonly used representations (JSON, XML, Atom).</p>
<p><strong>Portlet 2.0 support</strong></p>
<p>By now there&#8217;s more to the web than servlets, and the Spring support for JSR 168 has always worked like a bliss. With the recently finalized <a href="http://jcp.org/en/jsr/detail?id=286">Portlet 2.0 specification</a>, some long awaited features will soon make their way into the popular portlet containers. Spring Portlet MVC will address the most important of those in the 3.0 release, namely named actions, resource request and event-based inter-portlet communications, by means of additional annotations for <code>@Controller</code> annotated portlet controllers. <code>@ActionMapping</code> and <code>@RenderMapping</code> will be able to bind to named actions. <code>@ResourceMapping</code> will allow serving server-side resources while <code>@EventMapping</code> will allow you to implement handling of inter-portlet events.</p>
<p><strong>Model Validation</strong></p>
<p>With the advent of annotation based configuration, the old Validator mechanism feeled a little old-fashioned every now and then. For those of you who wished for something more Java 5 like, there&#8217;s hope on the horizon. Annotation-based model validation will be part of the final Spring 3.0 release. While the exact syntax is not yet finalized, the examplex given showed <code>@NotNull</code> and <code>@ShortDate</code> as field leven annotations. Probably one of the more interesting facts about the new model validation mechanisms is the deep integration with Spring Web MVC and Spring JS to provide gracefully degrading client side validation when using the form namespace to bind to an annotated model class.<br />
Also, the Spring team seems to be evaluating <a href="http://jcp.org/en/jsr/detail?id=303">JSR 303</a> and the <a href="http://www.hibernate.org/412.html">Hibernate Validator</a> project, so we can probably hope for support for standard validation annotations.</p>
<p><strong>Conversational scope and stateful controller objects</strong></p>
<p>While not as detailed as the features above, Jürgen also said that the team was evaluation possibilities for providing something along the lines of the Spring SWF conversation scope inside the Spring core. It would most likely be implemented as combination of a new bean scope and an API to programatically start and end conversations. While Spring SWF provides a very high level, declarative way of dealing with conversation semantics, this would enable all Spring modules and Spring based applications to utilize similar functionality.</p>
<p><strong>Factory annotations</strong></p>
<p>Spring 3.0 will contain a new stereotype annotation <code>@Factory</code>, that, combined with a method level <code>@FactoryMethod</code> annotation will allow implementing functionality similar to the current <code>BeanFactory</code> but with multiple bean creation methods.</p>
<p><strong>Pruning and deprecating</strong></p>
<p>It has now be confirmed that all currently deprecated artifacts will be removed with the final release of Spring 3.0 as long as there is no really compelling reason to leave them in the codebase. Most likely, the traditional MVC controller class hierarchy will be deprecated in favour of the new <code>@Controller</code> style. The same fate awaits the JUnit 3.8 based integration test class hierarchy and probably the HibernateTemplate and JPATemplated based classes. Additionally, support for Commons Attributes and the traditional Toplink API will be removed from the Spring core and probably factored out into separate legacy modules.</p>
<p><strong>Roadmap</strong></p>
<p>While J&uuml;rgen was very careful not to actually promise any release dates, the team is pressing hard to release a first milestone this month, containing a good share of the REST support as well as some of new the Spring EL functionality. RC1 is planned for December, probably just before christmas. Depending on community feedback on this and subsequently published release candidates, the release of a GA version should occur around February 2009.</p>
<p><strong>&#8230; and beyond.</strong></p>
<p>J&uuml;rgen made clear that plans don&#8217;t end with 3.0. There&#8217;s already some vision of the upcoming functionality in Spring 3.1 and 3.2, although, given the timeframe, this should apparently be handled with care. Spring 3.1, which is scheduled for July 2009 might contain support for <a href="http://jcp.org/en/jsr/detail?id=311">JAX-RS&#8217;</a>s endpoint model as alternative to Spring Web MVC based RESTFUL applications as well as support for the upcoming <a href="http://jcp.org/en/jsr/detail?id=315">Servlet 3.0 specification</a>. There&#8217;s also a discussion about supporting <a href="http://jcp.org/en/jsr/detail?id=299">Web Beans</a> annotations while that specification is awaiting it&#8217;s finalization.</p>
<p>About Spring 3.2, due in late 2009, only wild guesses can be made, but there will likely be some support for Java 7 features (like binding support for the new DateTime API). Java 5 support will, however, be guaranteed throughout the lifetime of Spring 3.x.</p>
]]></content>
	</entry>
		<entry>
		<author>
			<name>Nils Wloka</name>
						<uri>http://www.springify.com</uri>
					</author>
		<title type="html"><![CDATA[News from SpringOne 2008: RESTful Spring 3.0]]></title>
		<link rel="alternate" type="text/html" href="http://www.springify.com/archives/16" />
		<id>http://www.springify.com/archives/16</id>
		<updated>2008-06-12T22:38:18Z</updated>
		<published>2008-06-12T22:38:18Z</published>
		<category scheme="http://www.springify.com" term="Spring Framework" /><category scheme="http://www.springify.com" term="3.0" /><category scheme="http://www.springify.com" term="REST" /><category scheme="http://www.springify.com" term="RESTful Spring" /><category scheme="http://www.springify.com" term="RestTemplate" /><category scheme="http://www.springify.com" term="Spring" /><category scheme="http://www.springify.com" term="Spring MVC" /><category scheme="http://www.springify.com" term="Spring WS" /><category scheme="http://www.springify.com" term="SpringOne08" /><category scheme="http://www.springify.com" term="WebServices" />		<summary type="html"><![CDATA[Everybody&#8217;s talking about REST and RESTful web applications, so it doesn&#8217;t come as a surprise that there would be some kind of support for this architecture style in Spring sooner or later.  Today at the SpringOne in Antwerp, Arjen gave a presentation on that topic and actually revealed what the announced  &#34;full-scale&#34; REST [...]]]></summary>
		<content type="html" xml:base="http://www.springify.com/archives/16"><![CDATA[<p>Everybody&#8217;s talking about REST and RESTful web applications, so it doesn&#8217;t come as a surprise that there would be some kind of support for this architecture style in Spring sooner or later.  Today at the SpringOne in Antwerp, <a href="http://blog.springframework.com/arjen/">Arjen</a> gave a presentation on that topic and actually revealed what the <a href="http://www.springify.com/archives/15">announced </a> &quot;full-scale&quot; REST support will look like. So here&#8217;s the details for those of you who haven&#8217;t had the opportunity to be here in Antwerp:</p>
<p><b>REST support will be based on Spring MVC instead of Spring WS</b><br />
Those of you who have already had a look at the Spring MVC 2.5 @Controller annotation and its companions, @RequestMapping, @RequestParam and @ModelAttribute will have noticed that it&#8217;s possible to map a request based on its HTTP method:</p>
<div class="dean_ch" style="white-space: nowrap;">
@RequestMapping<span class="br0">&#40;</span>method = RequestMethod.<span class="me1">POST</span><span class="br0">&#41;</span><br />
&nbsp;</div>
<p>This already &quot;smelled&quot; REST-like, so I guess it was just consequential to use Spring MVC as base for the upcoming REST support in Spring 3.0. I had the opportunity to talk about it with Arjen and he explained that they were actually experimenting with various concepts for doing this in Spring WS, but in the end, Spring MVC felt like the more natural choice.<br />
But what will it look like then? Extend a welcome to&#8230;</p>
<p><b>UriTemplate and @PathParam</b><br />
Well, actually @PathParam might not be the final name, I&#8217;ve also seen @UriParam somewhere, but the usage will be the same. I&#8217;ll just give you an example:</p>
<div class="dean_ch" style="white-space: nowrap;">
@RequestMapping<span class="br0">&#40;</span>value = <span class="st0">&quot;/gadgets/{id}&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; method = RequestMethod.<span class="me1">GET</span><span class="br0">&#41;</span><br />
<span class="kw2">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AView+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">View</span></a> getGadget<span class="br0">&#40;</span>@PathParam <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> id<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; <span class="co1">// Fetch a gadget by id and </span><br />
&nbsp; <span class="co1">// return its representation as view</span><br />
<span class="br0">&#125;</span><br />
&nbsp;</div>
<p>It can&#8217;t possibly get easier that that. Best of all, you can reuse your investment in Spring MVC because the programming model doesn&#8217;t change. The final release will include support for binding to more than one URI wildcard as well as identification of the requested representation based on HTTP Accept headers (for machine clients) or file extensions (for browsers).</p>
<p>Additional feature will include:</p>
<ul>
<li>Using the Spring WS OXM support for creating XML views for requested resources</li>
<li>Additional views including AtomView, RssView and probably JsonView, too</li>
<li>Automatic generation and evaluation of HTTP ETag Header entries for caching purposes implemented as servlet filter</li>
<li>Interpretation of hidden form fields as HTTP method (as HTML only allows GET and POST in forms) by means of a servlet filter</li>
</ul>
<p>You might wonder whether there will be any support for building REST clients as well. Indeed there is, and it&#8217;s - not much of a surprise here - &#8230;</p>
<p><b>RestTemplate</b><br />
You can expect the usual usage patterns here and Arjen showed some actual code, so it&#8217;s pretty clear what the API (which by the way seems to be implemented on top of <a href="http://hc.apache.org/httpclient-3.x/">Commons HttpClient</a>) is going to look like. I&#8217;ll just give a few examples based on Arjen&#8217;s slides here:</p>
<div class="dean_ch" style="white-space: nowrap;">
<span class="co1">// Retrieving a represenation with </span><br />
<span class="co1">// getForObject (with parameter substitution)</span><br />
RestTemplate template = <span class="kw2">new</span> RestTemplate<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
Gadget gadget = template.<span class="me1">getForObject</span><span class="br0">&#40;</span><br />
&nbsp; &nbsp; <span class="st0">&quot;http://www.springify.com/gadgets/{id}&quot;</span>, <br />
&nbsp; &nbsp; Gadget.<span class="kw2">class</span>, <span class="nu0">1</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">// Creating a resource with postForLocation </span><br />
<span class="co1">// (with parameter substitution, map variant)</span><br />
Map&lt;String, String&gt; params = <br />
&nbsp; &nbsp; <span class="kw2">new</span> HashMap&lt;String, String&gt;<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
params.<span class="me1">put</span><span class="br0">&#40;</span><span class="st0">&quot;id&quot;</span>, <span class="nu0">42</span><span class="br0">&#41;</span>; <br />
URI uri = template.<span class="me1">postForLocation</span><span class="br0">&#40;</span><br />
&nbsp; &nbsp; <span class="st0">&quot;http://www.springify.com/gadgets/{id}/features&quot;</span>, <br />
&nbsp; &nbsp; <span class="kw2">new</span> Feature<span class="br0">&#40;</span><span class="st0">&quot;Glows in the dark.&quot;</span><span class="br0">&#41;</span>, params<span class="br0">&#41;</span>;</p>
<p><span class="co1">// Deleting a resource with delete</span><br />
template.<span class="me1">delete</span><span class="br0">&#40;</span><br />
&nbsp; &nbsp; <span class="st0">&quot;http://www.springify.com/gadgets/{id}&quot;</span>, someId<span class="br0">&#41;</span>;</p>
<p><span class="co1">// &#8230; and the obligatory callback pattern, albeit without </span><br />
<span class="co1">// further details yet. Method parameter will be provided </span><br />
<span class="co1">// in the form of Enum types.</span><br />
template.<span class="me1">execute</span><span class="br0">&#40;</span><br />
&nbsp; &nbsp; <span class="st0">&quot;http://www.springify.com/gadgets/42/feature/1&quot;</span>, <br />
&nbsp; &nbsp; POST, <br />
&nbsp; &nbsp; aRequestCallback, <br />
&nbsp; &nbsp; aResponseCallback<span class="br0">&#41;</span>;<br />
&nbsp;</div>
<p>Looks pretty straightforward to me. So now that we know the &quot;what&quot;, what about the &quot;when&quot;. Well, there&#8217;s some good news here. The first two features, namely RestTemplate for building clients and @PathParam for mapping to UriTemplate wildcards will be available in Spring 3.0 M1, which is scheduled for July or August. The remaining features will follow while Spring progresses towards 3.0 GA in late 2008.</p>
<p><b>What&#8217;s left</b><br />
Well, there&#8217;s the issue of authentication and authorization, which is apparently taken care of by the Spring Security team. Arjen mentioned support for configuring access restrictions based on both HTTP methods and URLs, but I don&#8217;t have any details here.</p>
<p>That&#8217;s it for tonight as it&#8217;s getting late and I need to catch the train back home early tomorrow. I hope to post a summary of the SpringSource Application Platform sessions early next week, so keep an eye on the <a href="http://feeds.feedburner.com/Springify">feed</a>.</p>
]]></content>
	</entry>
		<entry>
		<author>
			<name>Nils Wloka</name>
						<uri>http://www.springify.com</uri>
					</author>
		<title type="html"><![CDATA[Live from SpringOne 2008: Collected bits about Spring 3.0]]></title>
		<link rel="alternate" type="text/html" href="http://www.springify.com/archives/15" />
		<id>http://www.springify.com/archives/15</id>
		<updated>2008-06-12T17:43:46Z</updated>
		<published>2008-06-12T17:43:46Z</published>
		<category scheme="http://www.springify.com" term="Spring Framework" /><category scheme="http://www.springify.com" term="3.0" /><category scheme="http://www.springify.com" term="moose hoovering" /><category scheme="http://www.springify.com" term="News" /><category scheme="http://www.springify.com" term="Spring" /><category scheme="http://www.springify.com" term="SpringOne08" />		<summary type="html"><![CDATA[I wouldn&#8217;t go as far as to call the SpringSource team secretive, but they sure are building up tension with regards to the Spring 3.0. The talk I expected to provide a roadmap and feature summary actually did focus on version 2.5 feature. I wrote about some of the more interesting points here. I tried, [...]]]></summary>
		<content type="html" xml:base="http://www.springify.com/archives/15"><![CDATA[<p>I wouldn&#8217;t go as far as to call the SpringSource team secretive, but they sure are building up tension with regards to the Spring 3.0. The talk I expected to provide a roadmap and feature summary actually did focus on version 2.5 feature. I wrote about some of the more interesting points <a href="http://www.springify.com/archives/14">here</a>. I tried, however, to collect the various bits of information about the 3.0 release, so here you go (just remember that most of this could still be subject to change and shouldn&#8217;t be considered official):</p>
<p><b>Timeline</b><br />
According to Jürgen, there&#8217;s the plan to have a first milestone by August 2008, although I&#8217;ve also heard July mentioned. If everything goes well, we might see a GA release late in Q4 2008.</p>
<p><b>Theme</b><br />
Actually, Spring 3.0 will probably intensify what Spring 2.5 started: the embrace of the Java 5 programming model, this time to the extend that the Spring Core itself will be partially rearchitected and for the first time depend on Java 5. Internal (and gracefully downgrading) usage of Java 6 features will be expanded, although where and what was not announced. Also, there seems to be the trend to generalise certain parts of non-core modules in order to incorporate them into the core - for more about this see below.</p>
<p><b>Features</b><br />
Well, there was not an aweful lot of information availabe about new features planned for 3.0 (with the exception of RESTful Spring, I&#8217;ll blog about that later tonight when I&#8217;ve ordered my notes), but here you go:</p>
<ul>
<li>Full scale REST support by means of additions to the Spring MVC API - already pretty detailed, and apparently going to be included in the first milestone release</li>
<li>Support for Unified EL (as seen in Spring Web Flow) - very likely part of 3.0, but no details given</li>
<li>Annotation support for declaring factory methods - as above</li>
<li>Support for Portlet 2.0 (<a href="http://jcp.org/en/jsr/detail?id=286">JSR 286</a>), including resource requests (ResourceServingPortlet) - as above</li>
<li>&quot;Preparations&quot; for Servlet 3.0 specification - sounded a lot like architectural preparations not visible to the &quot;consumer&quot;</li>
<li>Something to fill the gap between Spring Web Flow and Spring MVC - that sounded very vague</li>
<li>Inclusion (probably generalisation) of the repeat, retry and resume semantics provided by <a href="http://static.springframework.org/spring-batch/index.html">Spring Batch</a> - was only hinted at, no details given</li>
<li>Inclusion of the OXM support provided by Spring WS - sounded pretty definitive, but no details given</li>
<li>Some kind of site definition language for the web stack - no idea whether this is more than a rumour</li>
<li>Model-based validation for use both in server and client - as above</li>
</ul>
<p>There&#8217;s probably more planned, but I guess we&#8217;ll have to wait for the first milestone to get a detailed roadmap.</p>
<p><b>Important changes</b><br />
The one apparent and rather fundamental change is that Spring 3.0 will no longer run on Java 1.4. Apparently most of the core is refactored to use generics, enumerations and variable argument lists. Apart from that, some pruning is going to happen:</p>
<ul>
<li>Deprecated artifacts will be removed</li>
<li>Some artifacts will probably marked as deprecated as of Spring 3.0, including the traditional Spring MVC controller hierarchy and the old JUnit 3.8 based integration test class hierarchy.</li>
<li>Commons Attributes support will probably be removed because it doesn&#8217;t make too much sense in a Java 5 environment</li>
<li>Support for plain Toplink will probably removed from the core</li>
</ul>
<p>According to Jürgen, the programming model itself will be 100% backwards compatible with Spring 2.5. The framework&#8217;s extension points will, however, be pruned to accomodate for the fact that some of them won&#8217;t make sense in a Java 5 environment. Jürgen mentioned 95% backwards compatibility with regards to extension points, so that shouldn&#8217;t be much of an issue. </p>
<p>That&#8217;s it for now, expect another posting about developing RESTful Spring applications with Spring 3.0 later tonight.</p>
]]></content>
	</entry>
		<entry>
		<author>
			<name>Nils Wloka</name>
						<uri>http://www.springify.com</uri>
					</author>
		<title type="html"><![CDATA[Live from SpringOne 2008: Spring 2.5 on the Way to 3.0]]></title>
		<link rel="alternate" type="text/html" href="http://www.springify.com/archives/14" />
		<id>http://www.springify.com/archives/14</id>
		<updated>2008-06-11T16:13:01Z</updated>
		<published>2008-06-11T16:13:01Z</published>
		<category scheme="http://www.springify.com" term="Spring Framework" /><category scheme="http://www.springify.com" term="Spring" /><category scheme="http://www.springify.com" term="SpringOne08" />		<summary type="html"><![CDATA[As all of you probably know of the nice new features that arrived with Spring 2.5, I&#8217;m going to concentrate on the &#8220;gems&#8221; I harvested from Jürgens presentation. As for the 3.0 stuff, I&#8217;m going to collect the various bits of information that seem to pop up in various talks and write about it once [...]]]></summary>
		<content type="html" xml:base="http://www.springify.com/archives/14"><![CDATA[<p>As all of you probably know of the nice new features that arrived with Spring 2.5, I&#8217;m going to concentrate on the &#8220;gems&#8221; I harvested from <a href="http://blog.springsource.com/main/author/juergenh/">Jürgens</a> presentation. As for the 3.0 stuff, I&#8217;m going to collect the various bits of information that seem to pop up in various talks and write about it once I find the time to put all the pieces of the puzzle together&#8230;</p>
<p>One of the main themes in Spring 2.5 has been the progression towards Java 5 and JEE 5 programming models (e.g. by means of annotation driven configuration options and support for JEE annotations). The other apparent trend was the advent of load-time weaving as alternative to the traditionally proxy-based AOP model in earlier Spring releases. As Jürgen explained the major features that have been introduces in this context, he mentioned a couple of not so obvious facts about Spring 2.5 that I&#8217;d like to relay to you:</p>
<p><b>Registering custom annotations for component scan</b><br />
You can write your own stereotype annotations (yes, completely independent from the Spring annotations) and make the container automatically pick up your annotated components by supplying filters to the ClassPathBeanDefinitionScanner responsible for determining valid candidates. See the <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.html#addIncludeFilter(org.springframework.core.type.filter.TypeFilter)">documentation</a> for details. This sounds great for implementing <a href="http://www.domaindrivendesign.org/">domain-driven design</a> principles by providing intention revealing annotations.</p>
<p><b>OpenJPA save point support</b><br />
Spring&#8217;s <a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/orm/jpa/vendor/OpenJpaVendorAdapter.html">OpenJpaVendorAdapter</a> exposes <a href="http://openjpa.apache.org/">OpenJPA</a>&#8217;s <a href="http://openjpa.apache.org/docs/latest/javadoc/org/apache/openjpa/persistence/OpenJPAEntityManager.html">extended EntityManager implementation</a>. As Spring&#8217;s JpaTransactionManager has support for JDBC 3.0 savepoints, this eventually allows you to use OpenJPA&#8217;s save point semantics. I&#8217;ll make sure to give this a try and blog about how it works.  </p>
<p><b>LTW mode for &lt;tx:annotation-driven/&gt;</b><br />
All of you know about the annotation driven transaction demarcation, which is usually done by the application context scanning your classes for @Transactional and wrap them in Proxies. While this usually works great, there is, as various forum threads suggest, some amount of confusion regarding the limits of dynamic proxies, mainly when transaction propagation doesn&#8217;t work as expected with &#8220;class-internal&#8221; method calls. As I just learned, you can alleviate that problem by enabling load-time weaving via an agent or the custom classloader implementations that are bundled with Spring and configuring the transaction support with an additional attribute like shown here (ommiting the loadtime weaving configuration itself):</p>
<div class="dean_ch" style="white-space: nowrap;">
<span class="sc3"><span class="re1">&lt;tx:annotation-driven</span> <span class="re0">mode</span>=<span class="st0">&quot;aspectj&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp;</div>
<p>Neat, isn&#8217;t it? Methods annotated with @Transactional will be augmented during load-time afterwards, no more proxies are needed.</p>
<p>Well, that&#8217;s it for now, I&#8217;m off to listen to Mark Fisher&#8217;s talk about Spring Integration.</p>
]]></content>
	</entry>
		<entry>
		<author>
			<name>Nils Wloka</name>
						<uri>http://www.springify.com</uri>
					</author>
		<title type="html"><![CDATA[Live from SpringOne 2008: Keynote]]></title>
		<link rel="alternate" type="text/html" href="http://www.springify.com/archives/13" />
		<id>http://www.springify.com/archives/13</id>
		<updated>2008-06-11T09:49:25Z</updated>
		<published>2008-06-11T09:49:25Z</published>
		<category scheme="http://www.springify.com" term="Spring Framework" /><category scheme="http://www.springify.com" term="Spring" /><category scheme="http://www.springify.com" term="SpringOne08" />		<summary type="html"><![CDATA[After having won the battle against Antwerp rush hour traffic, I arrived just in time for this year&#8217;s SpringOne keynote. Considering the momentum the Spring Framework has gained since my last attendance in 2006, I shouldn&#8217;t have been surprised by the sheer number of people who were already swarming the Metropolis cinema complex. As Stephan [...]]]></summary>
		<content type="html" xml:base="http://www.springify.com/archives/13"><![CDATA[<p>After having won the battle against Antwerp rush hour traffic, I arrived just in time for this year&#8217;s SpringOne keynote. Considering the momentum the Spring Framework has gained since my last attendance in 2006, I shouldn&#8217;t have been surprised by the sheer number of people who were already swarming the Metropolis cinema complex. As <a href="http://www.bejug.org/confluenceBeJUG/display/~stephan">Stephan</a> just told us, some 400 people from 25 countries have registered. But back to what&#8217;s happening on screen right now:<br />
Stephan just finished his introductory talk, which he mainly spent showing all the shiney features of <a href="http://parleys.com/display/PARLEYS/Home">Parleys</a>, with the announcement that due to trademark issue, Javapolis will officially be renamed to <a href="http://www.javoxx.com/display/JV08/Home">Javoxx</a> and handed off the microphone to <a href="http://blog.springsource.com/main/author/rodj/">Rod</a>.<br />
Rod&#8217;s just promised that the keynote he&#8217;s about to hold is going to address technical people and presented statistics which showed that recently Spring overtook EJB as requirement on the US job market. Also, <a href="http://www.gartner.com/">Gartner</a> and <a href="http://www.forrester.com/">Forrester</a> seem to be convinced that Spring is going to be the key framework for developing enterprise Java applications and middleware services.<br />
A point that Rod doesn&#8217;t get tired to emphasise is that Spring is about choice. One important step into that direction was the comprehensive support for annotation-based configuration in Spring 2.5. Even while the syntax is new, using @Autowired and @Qualifier is equivalent to the autowiring by type and by name that has always been part of Spring&#8217;s configuration options. What&#8217;s new is the possibility to define own qualifier annotations by annotating them with @Qualifier, as shown on the example below.</p>
<div class="dean_ch" style="white-space: nowrap;">
@Qualifier<br />
@<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AComponent+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Component</span></a><br />
@<span class="kw2">interface</span> Apac <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="co1">// Implementation omitted</span><br />
<span class="br0">&#125;</span></p>
<p>@Apac<br />
<span class="kw2">public</span> <span class="kw2">class</span> SomeLocalizedService <span class="kw2">implements</span> SomeService <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="co1">// Implementation omitted</span><br />
<span class="br0">&#125;</span></p>
<p>
<span class="kw2">public</span> <span class="kw2">class</span> SomeConsumer <span class="br0">&#123;</span><br />
&nbsp; &nbsp; @Apac<br />
&nbsp; &nbsp; SomeService someService;<br />
&nbsp; &nbsp; <span class="co1">// Implementation omitted</span><br />
<span class="br0">&#125;</span><br />
&nbsp;</div>
<p>The framework will associate the custom annotations and use them to chose the proper instance instance for injection. This leads to using Spring annotations as &#8220;meta-annotations&#8221; (a term just coined by Rod) to build own sets of domain-specific annotations that turn classes they are applied to to Spring-managed components. Combined with the classpath scanning functionality included in Spring 2.5, you could - if you really wanted to - avoid writing any XML configuration at all.</p>
<p>As the keynote progresses, Rod&#8217;s stressing that one of the most important freebies you get when using Spring is the ability to secure your application by means of <a href="http://static.springframework.org/spring-security/site/index.html">Spring Security</a> (formerly Acegi Security). As we all happen to know by now, every time you used Acegi, <a href="http://netzooid.com/blog/2007/12/03/every-time-you-use-acegi/">a fairy died</a>. The configuration was just horrible (someone compared it to strangling a dragon with bare hands, though I seem to have lost the link; speak up if its you) as it basically boiled down to writing bean definition for all the Acegi low level components. Spring Security comes with a custom namespace that (almost) solves this problem. Personally I still find it daunting, but I also think that the domain it applies to is important enough to use it nevertheless.</p>
<p>One thing Rod seems to be surprised of - and I&#8217;m with him there - is that almost no one in the audience uses the Spring integration testing framework provided by means of Spring TestContext. For those of you not attending SpringOne, I&#8217;m gladly relaying his invitation to give it a try and donate the money you save by doing so (to him, but that&#8217;s just an implementation detail you&#8217;re free to change). I gave an <a href="http://www.springify.com/archives/8">example of how to use it for test-driven development</a> in a recent post.</p>
<p>Spring Integration is another new addition to the Spring Framework family. Considering that Spring has always been a strong integration platform, being able to use it as quasi service bus with a domain specific configuration language implementing <a href="http://www.eaipatterns.com/ramblings.html">Gregor Hohpe&#8217;s</a> EAI patterns seems pretty convenient. I&#8217;m going to blog about this in detail in the near future, so I will not dig into the details here.</p>
<p>If you have used Spring MVC in Spring 2.0, you should also have a look at the new features introduced with the 2.5 release. I have written about it before, but I think the new &#8220;convention over configuration&#8221; mentality introduced here - especially with the advent of <a href="http://static.springframework.org/spring/docs/2.5.x/reference/mvc.html#mvc-annotation">@Controller</a> - is worth noting again. Things have become a lot easier and, combined with the new <a href="http://www.springframework.org/webflow">Spring Web Flow</a> release, development web applications with Java might even become fun (well, in the broader sense). Some of the highlights of both frameworks, namely the aforementioned @Controller annotation, SWF&#8217;s Ajax features, Spring JavaScript (which is, according to <a href="http://blog.springsource.com/main/author/keithd/">Keith</a>, who just took over the microphone, is &#8220;a toolkit for progressively enhancing web pages with AJAX&#8221; built on <a href="http://dojotoolkit.org/">DOJO</a>) and Spring Faces (which basically makes JSF as component framework available within Spring Web Flow driven applications and could be considered a JSF integration layer) found their way into the keynote.</p>
<p>With Rod back at the microphone, the topic now is deployment models and runtimes for Spring based application. He stresses that developing with the Spring programming models in fact decouples your code from the runtime environment, as Spring as container works in all deployment models available today (JEE, Servlet, OSGi, etc.). While portability on this level doesn&#8217;t seem like an issue, there&#8217;s the ongoing trend of deploying to to lightweight servlet containers like Tomcat and Jetty instead of commercial JEE containers. Whether or not OSGi will be the next generation enterprise runtime is yet to be determined, nevertheless the announcement of SpringSource Application Platform (<a href="http://www.springify.com/archives/11">I blogged about it here</a>) last month seems to be an indicator for it&#8217;s relevance. <a href="http://blog.springsource.com/main/author/robh/">Rob</a>, Application Platform lead, just entered the stage with an awesome S2AP t-shirt (100% bloat-free); if I am able to get one of those, I&#8217;ll post a picture here.</p>
<p>Rod&#8217;s talking about the <a href="http://springsource.com/products/enterprise">SpringSource Enterprise subscription</a> now, which, besides official support (including indemnification), grants access to the SpringSource Tool Suite, an Eclipse-based integrated development environment for Spring-based applications. As of the latest developer release, the Tool Suite comes with support for the PAR deployment style introduced with S2AP. Even while I&#8217;m not that much of an Eclipse person, I will try to give you an overview of what&#8217;s being presented here. I also have to mention the incredible pace at which <a href="http://blog.springsource.com/main/author/cdupuis/">Christian</a>, Spring IDE and STS lead, keeps up with the rapidly expanding and changing Spring stack. One interesting feature seems to be what Christian is calling &#8220;runtime error analysis&#8221;, which allows you to automatically look up stack traces in a knowledge base to find likely solutions to your programming problems. Actually STS incorporates a lot of what I&#8217;d call community features like forum access, recent news, etc. If you hate media disruptions as I do, this might be a good thing for you. Christian stresses that, due to the comprehensive context sensitive hints and the comprehensive knowledge about Spring best practices built into it, the Tool Suite can be used as a consulting and teaching platform for Spring based projects.<br />
The subscription also lets you use the SpringSource Application Management Suite, which is a runtime monitoring platform for Spring applications with support for all major JEE containers as well as Tomcat. I leave it up to you to look up the details of this and the other SpringSource enterprise products (fingers are already hurting) and write about SpringSource&#8217;s goals and motivations as presented by Rod at this moment.</p>
<p>Interesting enough Peter Cooper-Ellis, former WebLogic Unit Excutive, has just been hired by SpringSource for Engineering and Product Management. He&#8217;s right now talking about his background with proprietary software and how the the whole industry is moving towards deployment scenarios like cloud computing. One of his roles at SpringSource seems to be to help the Spring framework meet the demands those trends will make on the next generation&#8217;s application frameworks.</p>
<p>Well, I think that&#8217;s about it for now. I&#8217;ll keep you posted about any ground-breaking news, so make sure to subscribe to the feed.</p>
]]></content>
	</entry>
		<entry>
		<author>
			<name>Nils Wloka</name>
						<uri>http://www.springify.com</uri>
					</author>
		<title type="html"><![CDATA[A logical step]]></title>
		<link rel="alternate" type="text/html" href="http://www.springify.com/archives/11" />
		<id>http://www.springify.com/archives/11</id>
		<updated>2008-04-30T07:28:28Z</updated>
		<published>2008-04-30T07:28:28Z</published>
		<category scheme="http://www.springify.com" term="Spring Framework" /><category scheme="http://www.springify.com" term="application container" /><category scheme="http://www.springify.com" term="jee" /><category scheme="http://www.springify.com" term="Spring" />		<summary type="html"><![CDATA[It&#8217;s been some time since I last wrote an article here, but after having found this in my InfoQ feed today, I felt the urge to share and discuss my thoughts. 
Let me summarize the article for those of you who haven&#8217;t yet had the opportunity to read it. To put it in a nutshell, [...]]]></summary>
		<content type="html" xml:base="http://www.springify.com/archives/11"><![CDATA[<p>It&#8217;s been some time since I last wrote an article here, but after having found <a href="http://www.infoq.com/news/2008/04/springsource-app-platform">this</a> in my <a href="http://www.infoq.com/">InfoQ</a> feed today, I felt the urge to share and discuss my thoughts. </p>
<p>Let me summarize the article for those of you who haven&#8217;t yet had the opportunity to read it. To put it in a nutshell, <a href="http://www.springsource.com/">SpringSource</a> is about to or already released as beta their own Java application container based on Spring, Tomcat and OSGi. I&#8217;m not actually surprised by this move as there have been a lot of hints pointing into this direction in the past, the <a href="http://www.springsource.com/web/guest/2008/covalentaquisition">acquisition of Covalent</a> probably being the most prominent one.</p>
<p>Anyway, I personally find it exciting news as, if the bundle delivers what is promised in the article, this might mean that there will be a &#8220;natural&#8221; application container choice for Spring-based projects. Having seen a lot of high-profile app-server installations in the field that were used as mere servlet containers (but with a hefty administration and footprint overhead), I consider this a good thing. Add the SpringSource support offer and you will have a much easier time arguing in favour of Tomcat as a lightweight alternative.<br />
Vice versa, it might be easier to argue in favour of the Spring programming model once you can toss in a fully supported and integrated runtime environment for it too.</p>
<p>I hope I can get my hands on a beta release soon to play around with the OSGi deployment model (and to see whether I can bully Maven into building PAR archives for me). In the meantime I&#8217;d really like to hear what you think about the announcement.</p>
]]></content>
	</entry>
		<entry>
		<author>
			<name>Nils Wloka</name>
						<uri>http://www.springify.com</uri>
					</author>
		<title type="html"><![CDATA[TDD with Spring&#8217;s configuration magic]]></title>
		<link rel="alternate" type="text/html" href="http://www.springify.com/archives/8" />
		<id>http://www.springify.com/archives/8</id>
		<updated>2007-12-05T10:48:57Z</updated>
		<published>2007-12-04T20:29:52Z</published>
		<category scheme="http://www.springify.com" term="Spring Framework" /><category scheme="http://www.springify.com" term="Concordion" /><category scheme="http://www.springify.com" term="Test-driven development" />		<summary type="html"><![CDATA[While preparing a presentation on test-driven development, I had the chance to play around with the new configuration annotations. Despite my initial aversion against &#34;polluting&#34; my domain classes, the experience was rather pleasant.
The trivial three class example I prepared will hardly be usable as proof of concept for real-life development with Spring 2.5 configuration annotations. [...]]]></summary>
		<content type="html" xml:base="http://www.springify.com/archives/8"><![CDATA[<p>While preparing a presentation on test-driven development, I had the chance to play around with the new configuration annotations. Despite my initial aversion against &quot;polluting&quot; my domain classes, the experience was rather pleasant.<br />
The trivial three class example I prepared will hardly be usable as proof of concept for real-life development with Spring 2.5 configuration annotations. Nevertheless I&#8217;m rather sure that those annotations will save valuable time during prototyping and early development phases. So without further ado, here&#8217;s what the code looks like&#8230;</p>
<p>I started with the following integration test:<br/></p>
<div class="dean_ch" style="white-space: nowrap;"><span class="kw2">package</span> com.<span class="me1">springify</span>.<span class="me1">example</span>;</p>
<p><span class="co2">import static org.hamcrest.core.Is.is;</span><br />
<span class="co2">import static org.junit.Assert.assertThat;</span><br />
<span class="co2">import org.junit.Test;</span><br />
<span class="co2">import org.junit.runner.RunWith;</span><br />
<span class="co2">import org.springframework.beans.factory.annotation.Autowired;</span><br />
<span class="co2">import org.springframework.test.context.ContextConfiguration;</span><br />
<span class="co2">import org.springframework.test.context.TestExecutionListeners;</span><br />
<span class="co2">import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;</span><br />
<span class="co2">import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;</span></p>
<p>@RunWith<span class="br0">&#40;</span>SpringJUnit4ClassRunner.<span class="kw2">class</span><span class="br0">&#41;</span><br />
@ContextConfiguration<span class="br0">&#40;</span>locations = <span class="br0">&#123;</span><span class="st0">&quot;classpath:/com/springify/example/applicationContext.xml&quot;</span><span class="br0">&#125;</span><span class="br0">&#41;</span><br />
@TestExecutionListeners<span class="br0">&#40;</span><span class="br0">&#123;</span>DependencyInjectionTestExecutionListener.<span class="kw2">class</span><span class="br0">&#125;</span><span class="br0">&#41;</span><br />
<span class="kw2">public</span> <span class="kw2">class</span> UserServiceIntegrationTest <span class="br0">&#123;</span></p>
<p>&nbsp; &nbsp; @Autowired<br />
&nbsp; &nbsp; <span class="kw2">private</span> UserService userService;</p>
<p>&nbsp; &nbsp; @Test<br />
&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">void</span> addUserAndLogin<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; userService.<span class="me1">registerUser</span><span class="br0">&#40;</span><span class="st0">&quot;admin&quot;</span>, <span class="st0">&quot;password&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; assertThat<span class="br0">&#40;</span>userService.<span class="me1">login</span><span class="br0">&#40;</span><span class="st0">&quot;admin&quot;</span>, <span class="st0">&quot;password&quot;</span><span class="br0">&#41;</span>, is<span class="br0">&#40;</span><span class="kw2">true</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span> &nbsp; &nbsp;</p>
<p><span class="br0">&#125;</span></div>
<p></br><br />
Please note that I only had to use the <code>@TestExecutionListeners</code> annotation because for the purpose of demonstrating TDD I felt no urge to dive into the complexities of transaction management. While this is already pretty concise considering I&#8217;m setting up a complete environment here, just have a look at the bean definition:<br />
<br/></p>
<div class="dean_ch" style="white-space: nowrap;"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span><span class="re2">?&gt;</span></span><br />
<span class="sc3"><span class="re1">&lt;beans</span> <span class="re0">xmlns</span>=<span class="st0">&quot;http://www.springframework.org/schema/beans&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">xmlns:xsi</span>=<span class="st0">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">xmlns:context</span>=<span class="st0">&quot;http://www.springframework.org/schema/context&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">xsi:schemaLocation</span>=<span class="st0">&quot;http://www.springframework.org/schema/beans<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;http://www.springframework.org/schema/beans/spring-beans-2.5.xsd<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;http://www.springframework.org/schema/context<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;http://www.springframework.org/schema/context/spring-context-2.5.xsd&quot;</span><span class="re2">&gt;</span></span></p>
<p>&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;context:component-scan</span> <span class="re0">base-package</span>=<span class="st0">&quot;com.springify&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;context:annotation-config</span><span class="re2">/&gt;</span></span></p>
<p><span class="sc3"><span class="re1">&lt;/beans<span class="re2">&gt;</span></span></span></div>
<p><br/><br />
Not much in there, actually. But it has to be somewhere, doesn&#8217;t it? Maybe&#8230;<br />
<br/></p>
<div class="dean_ch" style="white-space: nowrap;"><span class="kw2">package</span> com.<span class="me1">springify</span>.<span class="me1">example</span>;</p>
<p><span class="co2">import org.springframework.beans.factory.annotation.Autowired;</span><br />
<span class="co2">import org.springframework.stereotype.Service;</span></p>
<p>@Service<br />
<span class="kw2">public</span> <span class="kw2">class</span> DefaultUserService <span class="kw2">implements</span> UserService <span class="br0">&#123;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">boolean</span> login<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> userName, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> password<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">throw</span> <span class="kw2">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AUnsupportedOperationException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">UnsupportedOperationException</span></a><span class="br0">&#40;</span><span class="st0">&quot;TODO&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">void</span> registerUser<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> userName, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> password<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">throw</span> <span class="kw2">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AUnsupportedOperationException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">UnsupportedOperationException</span></a><span class="br0">&#40;</span><span class="st0">&quot;TODO&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; @Autowired<br />
&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">void</span> injectUserRepository<span class="br0">&#40;</span>UserRepository userRepository<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// TODO</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
<p><br/><br />
and &#8230;<br />
<br/></p>
<div class="dean_ch" style="white-space: nowrap;"><span class="kw2">package</span> com.<span class="me1">springify</span>.<span class="me1">example</span>;</p>
<p><span class="co2">import org.springframework.stereotype.Repository;</span></p>
<p>@<a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ARepository+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Repository</span></a><br />
<span class="kw2">public</span> <span class="kw2">class</span> DefaultUserRepository <span class="kw2">implements</span> UserRepository <span class="br0">&#123;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">public</span> User getUser<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> username, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> password<span class="br0">&#41;</span> <span class="kw2">throws</span> LoginFailedException <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">throw</span> <span class="kw2">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AUnsupportedOperationException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">UnsupportedOperationException</span></a><span class="br0">&#40;</span><span class="st0">&quot;TODO&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">void</span> addUser<span class="br0">&#40;</span>User user, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> password<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">throw</span> <span class="kw2">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AUnsupportedOperationException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">UnsupportedOperationException</span></a><span class="br0">&#40;</span><span class="st0">&quot;TODO&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
<p><br/><br />
Yes, that looks like it could do the trick. Even if the amount of configuration saved by this approach might not be huge for the few beans used in this example, it still felt a lot more natural and &#8230; dare I say&#8230; agile, because I was able to concentrate on driving the design with my tests instead of wiring changing bean graphs together.</p>
<p>As a side note, it was fun to use the new Spring TestContext with my favorite acceptance testing framework <a href="http://www.concordion.org/">Concordion</a>. For quick results, all you actually have to do is copy the code from org.concordion.integration.junit3.ConcordionTestCase into a base class:</p>
<div class="dean_ch" style="white-space: nowrap;"><span class="kw2">package</span> com.<span class="me1">springify</span>.<span class="me1">integration</span>.<span class="me1">concordion</span>;</p>
<p><span class="co2">import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;</span><br />
<span class="co2">import org.junit.Test;</span><br />
<span class="co2">import org.concordion.Concordion;</span><br />
<span class="co2">import org.concordion.api.ResultSummary;</span><br />
<span class="co2">import org.concordion.internal.ConcordionBuilder;</span></p>
<p><span class="co2">import java.io.IOException;</span></p>
<p><span class="kw2">public</span> <span class="kw2">abstract</span> <span class="kw2">class</span> AbstractSpringConcordionTest <span class="kw2">extends</span> AbstractJUnit4SpringContextTests <span class="br0">&#123;</span></p>
<p>&nbsp; &nbsp; @Test<br />
&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">void</span> concordion<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="kw2">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AIOException+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">IOException</span></a> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Concordion concordion = <span class="kw2">new</span> ConcordionBuilder<span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">build</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ResultSummary resultSummary = concordion.<span class="me1">process</span><span class="br0">&#40;</span><span class="kw2">this</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">print</span><span class="br0">&#40;</span><span class="st0">&quot;Successes: &quot;</span> + resultSummary.<span class="me1">getSuccessCount</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">print</span><span class="br0">&#40;</span><span class="st0">&quot;, Failures: &quot;</span> + resultSummary.<span class="me1">getFailureCount</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>resultSummary.<span class="me1">hasExceptions</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">print</span><span class="br0">&#40;</span><span class="st0">&quot;, Exceptions: &quot;</span> + resultSummary.<span class="me1">getExceptionCount</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3ASystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;<span class="es0">\n</span>&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; resultSummary.<span class="me1">assertIsSatisfied</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p><span class="br0">&#125;</span><br />
&nbsp;</div>
<p><br/><br />
After that, you can create your dependency-injected fixtures like this:<br />
<br/></p>
<div class="dean_ch" style="white-space: nowrap;"><span class="kw2">package</span> com.<span class="me1">springify</span>.<span class="me1">example</span>;</p>
<p><span class="co2">import com.springify.integration.concordion.AbstractSpringConcordionTest;</span><br />
<span class="co2">import org.junit.runner.RunWith;</span><br />
<span class="co2">import org.springframework.beans.factory.annotation.Autowired;</span><br />
<span class="co2">import org.springframework.test.context.ContextConfiguration;</span><br />
<span class="co2">import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;</span></p>
<p>@RunWith<span class="br0">&#40;</span>SpringJUnit4ClassRunner.<span class="kw2">class</span><span class="br0">&#41;</span><br />
@ContextConfiguration<span class="br0">&#40;</span>locations = <span class="br0">&#123;</span><span class="st0">&quot;classpath:/com/springify/example/applicationContext.xml&quot;</span><span class="br0">&#125;</span><span class="br0">&#41;</span><br />
<span class="kw2">public</span> <span class="kw2">class</span> LoginTest <span class="kw2">extends</span> AbstractSpringConcordionTest <span class="br0">&#123;</span></p>
<p>&nbsp; &nbsp; @Autowired<br />
&nbsp; &nbsp; <span class="kw2">private</span> UserService userService;</p>
<p>&nbsp; &nbsp; <span class="kw2">public</span> <span class="kw4">void</span> addUser<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> userName, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> password<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; userService.<span class="me1">registerUser</span><span class="br0">&#40;</span>userName, password<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p>&nbsp; &nbsp; <span class="kw2">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> loginWith<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> userName, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a> password<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">return</span> <span class="br0">&#40;</span>userService.<span class="me1">login</span><span class="br0">&#40;</span>userName, password<span class="br0">&#41;</span> ? <span class="st0">&quot;was successful&quot;</span> : <span class="st0">&quot;failed&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span></p>
<p><span class="br0">&#125;</span><br />
&nbsp;</div>
]]></content>
	</entry>
		<entry>
		<author>
			<name>Nils Wloka</name>
						<uri>http://www.springify.com</uri>
					</author>
		<title type="html"><![CDATA[Spring 2.5 released]]></title>
		<link rel="alternate" type="text/html" href="http://www.springify.com/archives/7" />
		<id>http://www.springify.com/archives/7</id>
		<updated>2007-11-20T12:19:55Z</updated>
		<published>2007-11-20T12:19:55Z</published>
		<category scheme="http://www.springify.com" term="Spring Framework" /><category scheme="http://www.springify.com" term="Release" /><category scheme="http://www.springify.com" term="Websphere" />		<summary type="html"><![CDATA[It&#8217;s finally there, and with quite a handful of impressive new features, too. I especially like the new configuration options and the way you can actually do something vaguely similar to rapid prototyping even in the Java Enterprise world now. In my humble opinion, annotation-based controllers go a long way towards establishing Spring MVC as [...]]]></summary>
		<content type="html" xml:base="http://www.springify.com/archives/7"><![CDATA[<p>It&#8217;s finally there, and with quite a handful of impressive new features, too. I especially like the new configuration options and the way you can actually do something vaguely similar to rapid prototyping even in the Java Enterprise world now. In my humble opinion, annotation-based controllers go a <strong>long</strong> way towards establishing Spring MVC as a viable web framework alternative. Being a huge fan of <a href="http://mc4j.org/confluence/display/stripes/Home">Stripes&#8217;</a> &#8220;configuration-less&#8221; approach, I see some convergence here.</p>
<p>I also appreciate the efford that has gone into obtaining WebSphere certification for Spring 2.5, as lack of server vendor support can - at least with the clients I usually work for - still be an exclusion criterion.</p>
<p>So, to put it in a nutshell: Congratulations on this release to everybody at SpringSource and thanks for the awesome job you&#8217;re doing there.</p>
]]></content>
	</entry>
		<entry>
		<author>
			<name>Nils Wloka</name>
						<uri>http://www.springify.com</uri>
					</author>
		<title type="html"><![CDATA[Things Spring can&#8217;t help with&#8230;]]></title>
		<link rel="alternate" type="text/html" href="http://www.springify.com/archives/5" />
		<id>http://www.springify.com/?p=5</id>
		<updated>2007-11-13T12:23:46Z</updated>
		<published>2007-11-12T18:59:41Z</published>
		<category scheme="http://www.springify.com" term="Uncategorized" /><category scheme="http://www.springify.com" term="Family" /><category scheme="http://www.springify.com" term="Spring Framework" /><category scheme="http://www.springify.com" term="Spring Praxishandbuch" />		<summary type="html"><![CDATA[As you will most probably have noticed, I haven&#8217;t written all that much recently - nothing at all, actually. This is mainly due to the fact that I have been exceptionally busy with things entirely out of Spring&#8217;s scope (yes, they exist). Please give a warm welcome to my son, Leo Wloka, who has been [...]]]></summary>
		<content type="html" xml:base="http://www.springify.com/archives/5"><![CDATA[<p>As you will most probably have noticed, I haven&#8217;t written all that much recently - nothing at all, actually. This is mainly due to the fact that I have been exceptionally busy with things entirely out of Spring&#8217;s scope (yes, they exist). Please give a warm welcome to my son, Leo Wloka, who has been born on the 21st of October. As you can imagine, he and his mom will keep me rather busy for a while.</p>
<p>Nevertheless, I will, as I play around with the recent Spring 2.5 Release Candidate, blog about all noteworthy experiences. In the meantime, my german readers might enjoy reading the <a HREF="http://www.amazon.de/gp/product/3939084395?ie=UTF8&amp;tag=springify-21&amp;linkCode=as2&amp;camp=1638&amp;creative=6742&amp;creativeASIN=3939084395">Spring Praxishandbuch</a><img SRC="http://www.assoc-amazon.de/e/ir?t=springify-21&amp;l=as2&amp;o=3&amp;a=3939084395" WIDTH="1" HEIGHT="1" BORDER="0" STYLE="border:none !important; margin:0px !important;" />, which I had the pleasure of writing the JMS chapter for.</p>
]]></content>
	</entry>
		<entry>
		<author>
			<name>Nils Wloka</name>
						<uri>http://www.springify.com</uri>
					</author>
		<title type="html"><![CDATA[Good evening]]></title>
		<link rel="alternate" type="text/html" href="http://www.springify.com/archives/4" />
		<id>http://www.springify.com/?p=4</id>
		<updated>2007-11-13T12:23:30Z</updated>
		<published>2007-08-01T21:35:51Z</published>
		<category scheme="http://www.springify.com" term="Spring Framework" /><category scheme="http://www.springify.com" term="Java Magazin" />		<summary type="html"><![CDATA[This is your host Nils Wloka. Let me welcome you to my humble little Spring blog, which, after months of hesitance - and struggle against various pieces of blog software - I am happy to roll out today. Time permitting, I will periodically entertain you with posts about my various ideas and experiences regarding JEE [...]]]></summary>
		<content type="html" xml:base="http://www.springify.com/archives/4"><![CDATA[<p>This is your host Nils Wloka. Let me welcome you to my humble little Spring blog, which, after months of hesitance - and struggle against various pieces of blog software - I am happy to roll out today. Time permitting, I will periodically entertain you with posts about my various ideas and experiences regarding JEE development with the Spring Framework.</p>
<p>Until then, I would like to point any German readers to the articles I have written for the Advanced Spring series published in the German <a TARGET="_blank" HREF="http://javamagazin.de/">Java Magazin</a>. Feel free to leave your comments and questions here.</p>
]]></content>
	</entry>
	</feed>
