<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Transient Technology &#187; spring</title>
	<atom:link href="http://martinaharris.com/tag/spring/feed/" rel="self" type="application/rss+xml" />
	<link>http://martinaharris.com</link>
	<description>Next time you look it might be gone</description>
	<lastBuildDate>Wed, 25 Apr 2012 09:52:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to link unitils to a spring wired datasource</title>
		<link>http://martinaharris.com/2010/05/unitils-spring-wired-datasource/</link>
		<comments>http://martinaharris.com/2010/05/unitils-spring-wired-datasource/#comments</comments>
		<pubDate>Mon, 31 May 2010 22:06:35 +0000</pubDate>
		<dc:creator>Martin Harris</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[datasource]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[junit]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[unitils]]></category>

		<guid isPermaLink="false">http://martinaharris.com/?p=963</guid>
		<description><![CDATA[Unitils provides its own DataSource. This causes problems if you want to use Spring IOC to inject your own. There is a way around this but its not elegant. In future versions of unitils I believe the team is going &#8230; <a href="http://martinaharris.com/2010/05/unitils-spring-wired-datasource/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://unitils.org/" target="_blank">Unitils</a> provides its own DataSource. This causes problems if you want to use Spring IOC to inject your own. There is a way around this but its not elegant. In future versions of unitils I believe the team is going to provide better support for less intrusive methods. This post documents a way to use your own spring defined DataSource.<br />
<span id="more-963"></span><br />
Currently there is a unitils property that allows you to specify your own SpringDataSourceFactory.</p>
<p># unitils.properties</p>
<p># Assign the SpringDataSourceFactory DataSource.<br />
org.unitils.database.config.DataSourceFactory.implClassName= com.tek.design.unitils.SpringDataSourceFactory</p>
<p>Write your SpringDataSourceFactory and implement both DataSourceFactory and springs ApplicationContextAware interfaces. Then in the init method you will be able to fetch your spring DataSource bean from the application context using a service look up. Not ideal, but until future releases it will do just fine.</p>
<pre class="brush: java; gutter: false">package com.tek.design.unitils;

import java.util.Properties;
import javax.sql.DataSource;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.unitils.database.config.DataSourceFactory;

/**
 *
 * Unitil's provides a way to override the default DataSourceFactory.  This class provides facility to
 * spring wire in the same datasource used by your ORM by fetching it from the ApplicationContext.
 *
 * Use the org.unitils.database.config.DataSourceFactory.implClassName property to supply this factory to unitils.
 *
 */
public class SpringDataSourceFactory implements DataSourceFactory, ApplicationContextAware {

    private static ApplicationContext appContext;

    private DataSource dataSource;

    @Override
    public DataSource createDataSource() {
        return this.dataSource;
    }

    @Override
    public void init(Properties arg0) {

        if (null == this.dataSource) {
            String dataSourceBeanName = "TekDesignDataSource";
            this.dataSource = (DataSource) appContext.getBean(dataSourceBeanName);
            if (this.dataSource == null) {
                throw new SpringBeanLookupException(DataSource.class, "Cant find bean named " + dataSourceName);
            }
        }

    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        appContext = applicationContext;

    }

}</pre>
<h2>Full unitils properties file:</h2>
<p># unitils.properties</p>
<p># Provide a CSV of all used database schemas. ie schema1,schema2.<br />
# The first schema name is the default one.<br />
# If no schema name is specified in a dbunit data set the default one is used.<br />
#<br />
# A schema names are case sensitive when surrounded by database identifier quotes (e.g. &#8220;&#8221; for oracle)<br />
#<br />
# Example unitils description using a schema<br />
#<br />
#&lt;dataset xmlns:frt=&#8221;FRUIT&#8221;&gt;<br />
#   &lt;frt:APPLE NAME=&#8221;COX&#8221;<br />
#                           DESCRIPTION=&#8221;[null]&#8221; /&gt;<br />
#&lt;/dataset&gt;<br />
#<br />
database.schemaNames=fruit,veg</p>
<p># This property specifies the underlying DBMS implementation. Supported values are &#8216;oracle&#8217;, &#8216;db2&#8242;, &#8216;mysql&#8217;, &#8216;hsqldb&#8217;,<br />
# &#8216;postgresql&#8217;, &#8216;derby&#8217; and &#8216;mssql&#8217;. The value of this property defines which vendor specific implementations of<br />
# DbSupport and ConstraintsDisabler are chosen.<br />
database.dialect=oracle</p>
<p># The dao tests often share the same data in the setup files, so its important to<br />
# rollback between tests otherwise constraints will be violated.<br />
DatabaseModule.Transactional.value.default=rollback</p>
<p># Assign the SpringDataSourceFactory DataSource.<br />
org.unitils.database.config.DataSourceFactory.implClassName=<br />
com.tek.design.unitils.SpringDataSourceFactory</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F&amp;title=How+to+link+unitils+to+a+spring+wired+datasource" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F&amp;title=How+to+link+unitils+to+a+spring+wired+datasource" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F&amp;title=How+to+link+unitils+to+a+spring+wired+datasource" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F&amp;headline=How+to+link+unitils+to+a+spring+wired+datasource" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=How+to+link+unitils+to+a+spring+wired+datasource&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=How+to+link+unitils+to+a+spring+wired+datasource&amp;u=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=How+to+link+unitils+to+a+spring+wired+datasource&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=How+to+link+unitils+to+a+spring+wired+datasource&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=How+to+link+unitils+to+a+spring+wired+datasource&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F&amp;title=How+to+link+unitils+to+a+spring+wired+datasource&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Funitils-spring-wired-datasource%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><div class="dzone_button" style="float: right; margin-left: 5px;">
<script type="text/javascript">
var dzone_url = 'http://martinaharris.com/2010/05/unitils-spring-wired-datasource/';
var dzone_title = 'How to link unitils to a spring wired datasource';
var dzone_blurb = '';
var dzone_style = '2';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://martinaharris.com/2010/05/unitils-spring-wired-datasource/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tumble dried BDD from Studio Pragmatists</title>
		<link>http://martinaharris.com/2010/05/tumble-dried-bdd/</link>
		<comments>http://martinaharris.com/2010/05/tumble-dried-bdd/#comments</comments>
		<pubDate>Fri, 21 May 2010 22:02:32 +0000</pubDate>
		<dc:creator>Martin Harris</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[scrum and agile]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[annotation]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[behavior]]></category>
		<category><![CDATA[collaboration]]></category>
		<category><![CDATA[junit]]></category>
		<category><![CDATA[product-owner]]></category>
		<category><![CDATA[scrum]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[teams]]></category>
		<category><![CDATA[test-specialist]]></category>

		<guid isPermaLink="false">http://martinaharris.com/?p=1027</guid>
		<description><![CDATA[On the 18th of May, 2010, the very new tumbler-glass project by Studio Pragmatists uploaded Tumbler 0.2.1 to Maven.  Having recently written about JBehave I found myself really liking the concept of behavior driven development.  So I decided to write &#8230; <a href="http://martinaharris.com/2010/05/tumble-dried-bdd/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>On the 18th of May, 2010, the very new tumbler-glass project by <a title="Studio Pragmatists Blog" href="http://studiopragmatists.blogspot.com/" target="_blank">Studio Pragmatists</a> uploaded Tumbler 0.2.1 to Maven.  Having recently written about <a title="JBehave article" href="/2010/05/bad-or-good-bdd-within-scrum/" target="_blank">JBehave</a> I found myself really liking the concept of behavior driven development.  So I decided to write a similar article about Tumbler.  If you want the project code its available in my <a title="Testing Project" href="http://github.com/mhgit/TerribleJavaTestingMadeGood" target="_blank">example project</a>.</p>
<h2>4 hour time box in 20 minutes!</h2>
<p>Once again I decided to time box the work to 4 hours.  This time though the whole process only took about 20 minutes.  The product owner and testers produce a story file.  The Tumbler format allows for multiple stories each containing scenarios, so its possible to cover a complex set of requirements in one file.  This allows for flexibility when breaking down the work into tasks.  As per the usual behavior driven approach, a scenario contains the <strong>Given</strong>, <strong>When</strong> and <strong>Then</strong> sections which describe the behavior.<span id="more-1027"></span></p>
<h3>A simple tumbler behavior file</h3>
<pre>Story: Building a simple page

Scenario: should create a page 4 lines long with 5 data items in each line
Given a data fixture capable of complex page checking
When a page is created with 'twenty' items on a page
Then there should be 'four' lines on a page with 'five' data items on each line</pre>
<h2>Generating the Java files</h2>
<p>The next step is to generate java from the scenario files I used an eclipse run configuration but the command line is:</p>
<pre>java -classpath Tumbler.jar tumbler.ScenarioToJavaConverter YOUR_STORY.scenario</pre>
<p>For the above scenario this was the result.  Note the generation of given, when and then methods and @story, @Scenario annotations that match up with the original file.</p>
<pre class="brush: java; gutter: false; wrap-lines: false">import org.junit.*;
import static org.junit.Assert.*;
import static tumbler.Tumbler.*;

@RunWith(TumblerRunner.class)
@Story("Building a simple page")
public class BuildingASimplePageScenarios {

        @Scenario(pending = true)
        public void shouldCreateAPage4LinesLongWith5DataItemsInEachLine() {
                given("a data fixture capable of complex page checking");

                when("a page is created with 'twenty' items on a page");

                then("there should be 'four' lines on a page with 'five' data items on each line");
        }
}</pre>
<h3>Which just leaves filling in the behavior and the actual test</h3>
<pre class="brush: java; gutter: false; wrap-lines: false">@RunWith(TumblerRunner.class)
@Story("Building a simple page")
public class BuildingASimplePageScenarios {
	private SimplePage page;

	@Scenario(pending = false)
	public void shouldCreateAPage4LinesLongWith5DataItemsInEachLine() {
		given("a data fixture capable of complex page checking");
		final PageDataFixture dataFixture = new PageDataFixture();

		when("a page is created with 'twenty' items on a page");
		page = SimplePage.newInstance(dataFixture.getDataItem(), 20);

		then("there should be 'four' lines on a page with 'five' data items on each line");
		Map expectedLines = dataFixture.createPageExpectation(4, 5);

		Map actualMap = page.getMap();

		assertThat(actualMap, is(expectedLines));
       }
}</pre>
<p>Finally there are two flags that can be applied to the test runner which turn on the production of a report. (-DgenerateReport=html -DoutputFolder=target)  It would be easy to configure a maven profile that picked up all your scenario files, and passed in these two flags.  The standard report uses Freemarker so it would be easy to produce your own.  Its a simple list of scenarios and their detail.</p>
<h3>This is what my report looked like</h3>
<div id="attachment_1038" class="wp-caption alignnone" style="width: 160px"><a href="http://martinaharris.com/wp-content/uploads/2010/05/tumblerReport.jpg"><img class="size-thumbnail wp-image-1038" title="tumblerReport" src="http://martinaharris.com/wp-content/uploads/2010/05/tumblerReport-150x150.jpg" alt="Tumbler Report" width="150" height="150" /></a><p class="wp-caption-text">Tumbler Report - Scenario Detail Page</p></div>
<h2>Good Points</h2>
<ul>
<li>As per JBehave I like the attempt to draw the product owner closer to the testing and development team members.</li>
<li>Its a very simple system with very small learning curve</li>
<li>Generating the Java improves productivity and allows the product owner to work on separate artifacts</li>
</ul>
<h2>Bad Points</h2>
<ul>
<li>Currently its a very early beta release.  Not so much a criticism as a reminder that things might evolve in a breaking fashion at this stage.</li>
<li>I would like to see the ability to generate parameters out of the scenario files.  If not, then a way to edit the tests to introduce parameter driven testing.</li>
<li>Scrum and agile are iterative.  Adding to the original scenario files would mean generating the classes again.  This leaves the developer with the unpleasant task of transferring over changes. This might be solved if the inputs were the scenario file, and the finished test Java, with output that modifies and adds.  Running them would show the breaks if the parameters were also part of the generation.</li>
</ul>
<h2>Conclusion</h2>
<p>I can&#8217;t wait to see a full version, or at least a release candidate version because I can see a future for this project.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F&amp;title=Tumble+dried+BDD+from+Studio+Pragmatists" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F&amp;title=Tumble+dried+BDD+from+Studio+Pragmatists" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F&amp;title=Tumble+dried+BDD+from+Studio+Pragmatists" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F&amp;headline=Tumble+dried+BDD+from+Studio+Pragmatists" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Tumble+dried+BDD+from+Studio+Pragmatists&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Tumble+dried+BDD+from+Studio+Pragmatists&amp;u=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Tumble+dried+BDD+from+Studio+Pragmatists&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Tumble+dried+BDD+from+Studio+Pragmatists&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Tumble+dried+BDD+from+Studio+Pragmatists&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F&amp;title=Tumble+dried+BDD+from+Studio+Pragmatists&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Ftumble-dried-bdd%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><div class="dzone_button" style="float: right; margin-left: 5px;">
<script type="text/javascript">
var dzone_url = 'http://martinaharris.com/2010/05/tumble-dried-bdd/';
var dzone_title = 'Tumble dried BDD from Studio Pragmatists';
var dzone_blurb = '';
var dzone_style = '2';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://martinaharris.com/2010/05/tumble-dried-bdd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bad or Good? Behavior Driven Development within Scrum.</title>
		<link>http://martinaharris.com/2010/05/bad-or-good-bdd-within-scrum/</link>
		<comments>http://martinaharris.com/2010/05/bad-or-good-bdd-within-scrum/#comments</comments>
		<pubDate>Mon, 17 May 2010 17:46:35 +0000</pubDate>
		<dc:creator>Martin Harris</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[scrum and agile]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[annotation]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[behavior]]></category>
		<category><![CDATA[collaboration]]></category>
		<category><![CDATA[junit]]></category>
		<category><![CDATA[product-owner]]></category>
		<category><![CDATA[scrum]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[teams]]></category>
		<category><![CDATA[test-specialist]]></category>

		<guid isPermaLink="false">http://martinaharris.com/?p=1001</guid>
		<description><![CDATA[I wanted to explore the possibility of using JBehave to formalise scrums definition of done. The idea being to encapsulate a definition of done as a JBehave scenario. So in true scrum style I decided to timebox 4 hours of &#8230; <a href="http://martinaharris.com/2010/05/bad-or-good-bdd-within-scrum/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I wanted to explore the possibility of using <a title="JBehave about" href="http://jbehave.org/reference/stable/index.html" target="_blank">JBehave</a> to formalise scrums definition of done.  The idea being to encapsulate a definition of done as a JBehave scenario.  So in true scrum style I decided to timebox 4 hours of work dedicated to JBehave.</p>
<p>From a scrum point of view BDD can be used to turn the definition of done into a test artifact. The team produces scenarios for each task.  With JBehave a scenario file describes the required behavior and test steps it will need to pass to be considered done.  I.e Given some prerequisites, perform some action and expect some results.  See the JBehave project for more detail as this is only a simple example.<span id="more-1001"></span></p>
<h2>BDD in 4 hours?</h2>
<p>So scenarios are just text files describing the required functionality in terms of expected behavior.  Even before development though, its possible to run them and see the pending expectations.  Lets wizz though a simple example showing who in a scrum team is responsible for what.  I already have a project that I use to <a title="Testing Project" href="http://github.com/mhgit/TerribleJavaTestingMadeGood" target="_blank">explore test patterns</a> so I thought I would just introduce it to that.  If you want the working version just take a fork from github.</p>
<p>Nb. I have a data fixture used in testing a complex page component.  So whilst not a pure scenario I can make its existence part of the Givens.  In this project, its likely that no real given is required, but a developer would add it during the build.</p>
<p><strong>First</strong> the product owner and tester produce a simple scenario file describing behavior and expectations.</p>
<pre>Given a data fixture
When a page is created with 20 items on a page
Then expected lines on a page is 4 with data items in a line 5</pre>
<p><strong>Next</strong> developers write a harness and flesh out the steps required to meet the behaviour.</p>
<p>We need to bootstrap the scenario and add steps to it.  The general idea is to have a scenario test, that then includes the steps.  This is one way of bootstrapping in the steps, other ways are available including a spring system that uses <a title="SpringStepsFactory API" href="http://jbehave.org/reference/stable/javadoc/spring/org/jbehave/scenario/steps/spring/SpringStepsFactory.html" target="_blank">SpringStepsFactory</a>.  I ran into problems with the spring system as my project uses spring 3 and JBehave is still locked into spring 2.5.6.  In addition I am using junit 4.8 and spring 2.5.6 requires 4.4.  This is ultimately an issue as on many projects.  I would not want to tie in those older versions.  In fact other ideas in my project prevent me from doing this too.  So in my timebox I avoid the issue and bootstrap manually.</p>
<h2>The Bootstrap test class</h2>
<pre class="brush: java; gutter: false; wrap-lines: false">public class SimplePageScenario extends JUnitScenario {
	public SimplePageScenario() {
		super(new MostUsefulConfiguration() {
			@Override
			public ScenarioDefiner forDefiningScenarios() {
				return new ClasspathScenarioDefiner(
						new UnderscoredCamelCaseResolver(".scn"),
						new PatternScenarioParser());
                        }
                });

		addSteps(new SimplePageSteps());
        }
}</pre>
<p>Before adding the call to addSteps()) running the scenario shows the steps that are pending.</p>
<pre>(org/testpatterns/scenarios/example_scenario.scn)
Scenario:
Given a spring data fixture (PENDING)
When a page is created with 20 items on a page (PENDING)
Then expected lines on a page is 4 with data items in a line 5 (PENDING)</pre>
<p><strong>Finally</strong> the developers fill in the Steps class adding sections that match against the scenario keywords, Given, When and Then.  Development is done until the behavior passes the test.</p>
<pre class="brush: java; gutter: false; wrap-lines: false">public class SimplePageSteps extends Steps {

	private SimplePage page;

	private final PageDataFixture dataFixture = new PageDataFixture();

	@Given("a data fixture")
	public void givenASpringDataFixture() {
		notNull(dataFixture);
	}

	@When("a page is created with $itemsOnAPage items on a page")
	public void createPage(int itemsOnAPage) {
		page = SimplePage.newInstance(dataFixture.getDataItem(), itemsOnAPage);
	}

	@Then("expected lines on a page is $linesOnAPage with data items in a line $itemsInALine")
	public void validatePage(int linesOnAPage, int itemsInALine) {
		Map expectedLines = dataFixture.createPageExpectation(linesOnAPage, itemsInALine);

		Map actualMap = page.getMap();

		ensureThat(actualMap, is(expectedLines));
	}

}</pre>
<h2>Good Points</h2>
<ul>
<li> I like the potential to get key scrum members interacting.  The collaboration between the testers and product owner is an important one as it should flesh out questions about behaviour at an early stage.  Similar benefits occur when the development team starts to get to grip with the behavior.</li>
<li> Having a simple scenario artifact means the product owner can get involved with something that actually becomes part of the continuous integration.</li>
</ul>
<h2>Bad Points</h2>
<ul>
<li>The bootstrap is clumsy.  Having to add steps means that after producing the new scenarios development have to get involved before the pending steps appear.  There are other ways to bootstrap.  The spring system is a step in the right direction, in fact I would like to use injection throughout the application.  This still does not solve the problem of having to edit something before the steps appear.  I would prefer that once the scenario is in place, steps are automatically found as they are written, and appear as not started until they are cut.</li>
<li> Extending Junit Testcase is also a problem.  Its highly likely that in more complex projects we would need mocking techniques or spring based tests.  These have their own runners brought in with the @RunWith annotation.  It would be better if there were some way to bootstrap the behaviour into any other test framework.</li>
<li> In my 4 hour timebox I did not get the reporting working.  Unfortunately the reporting requires more coding, and setup and is far from being just a bit of maven configuration.</li>
<li> When running from maven things did not work until I configured the maven-resource-plugin to copy over the scenario files.  This should have just worked out of the box.</li>
<li>Most of my 4 hours was taken up with configuration which was compounded by the slim documentation.</li>
</ul>
<h2>Conclusion</h2>
<p>Attempting a behavior driven approach using scenarios is worth doing.  I could see the benefits.  Not sure if JBehave is the solution for me though.  Difficult to configure, and incompatibilities with other frameworks would put me off at the moment.  I will find some time to have a look at <a title="Easyb" href="http://www.easyb.org/" target="_blank">easyb</a> another java BDD system next.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 823px; width: 1px; height: 1px;"></div>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F&amp;title=Bad+or+Good%3F+Behavior+Driven+Development+within+Scrum." target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F&amp;title=Bad+or+Good%3F+Behavior+Driven+Development+within+Scrum." target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F&amp;title=Bad+or+Good%3F+Behavior+Driven+Development+within+Scrum." target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F&amp;headline=Bad+or+Good%3F+Behavior+Driven+Development+within+Scrum." target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Bad+or+Good%3F+Behavior+Driven+Development+within+Scrum.&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Bad+or+Good%3F+Behavior+Driven+Development+within+Scrum.&amp;u=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Bad+or+Good%3F+Behavior+Driven+Development+within+Scrum.&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Bad+or+Good%3F+Behavior+Driven+Development+within+Scrum.&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Bad+or+Good%3F+Behavior+Driven+Development+within+Scrum.&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F&amp;title=Bad+or+Good%3F+Behavior+Driven+Development+within+Scrum.&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fmartinaharris.com%2F2010%2F05%2Fbad-or-good-bdd-within-scrum%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><div class="dzone_button" style="float: right; margin-left: 5px;">
<script type="text/javascript">
var dzone_url = 'http://martinaharris.com/2010/05/bad-or-good-bdd-within-scrum/';
var dzone_title = 'Bad or Good? Behavior Driven Development within Scrum.';
var dzone_blurb = '';
var dzone_style = '2';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://martinaharris.com/2010/05/bad-or-good-bdd-within-scrum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lessons on testing a JPA Dao</title>
		<link>http://martinaharris.com/2009/11/lessons-on-testing-jpa-dao/</link>
		<comments>http://martinaharris.com/2009/11/lessons-on-testing-jpa-dao/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 00:50:24 +0000</pubDate>
		<dc:creator>Martin Harris</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[junit]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[unitils]]></category>

		<guid isPermaLink="false">http://martinaharris.com/?p=339</guid>
		<description><![CDATA[I wanted to explore unit testing JPA DAO and models. Hand crafting solutions is quite time consuming. I found something called Unitils which refines another project Dbunit. In theory it should significantly reduce the complexity and save some time. So one Saturday, I sat down to explore the space and write this blog. <a href="http://martinaharris.com/2009/11/lessons-on-testing-jpa-dao/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I wanted to explore unit testing JPA DAO and models.  Hand crafting solutions is quite time consuming.  I found something called <a href="http://unitils.org/">Unitils</a> which refines another project <a href="http://www.dbunit.org/">Dbunit</a>.  In theory it should significantly reduce the complexity and save some time.  So one Saturday, I sat down to explore the space and write this blog.</p>
<p><span id="more-339"></span><br />
One way to test a DAO method is to provide a data fixture written in java.  This will provide a populated in memory database and immutable objects that contain the data inserted.  The immutable objects can then be used later for making assertions against the data returned from the DAO method under test.  This describes a similar pattern: <a title="Db Unit Test with in memory Db" href="http://www.theserverside.com/tt/articles/article.tss?l=UnitTesting" target="_blank">Unit Test with in memory Db</a>.  I wrote a more modern version using the EntityManager instead of Jdbc and SpringTests with Junit 4 but the principle is the same.</p>
<p>There are some rules for my data fixture:</p>
<ul>
<li>The data must not be inserted using the DAO as this means your relying on the DAO under test.  <em>I used the entity manager providing direct insert statements and just executed the sql.</em></li>
<li>The data inserted must be driven from some immutable holder objects that encapsulate that data.  This provides a robust test and some handy containers that are used later in the test.  This also means that the test has no need whatsoever to know anything about the data!  It just needs to make assertions that the data holders contain the same data as the model returned from the dao.</li>
<li>Assert that default values are not used.  I have seen bugs because &#8217;0&#8242; was used as data in <strong>long</strong> type identifiers, then it turns out the code never set the variable.  <em>My data holders validate their invariants.</em></li>
<li>The fixture should be responsible for stringing together primary and foreign keys, avoiding problems with uniqueness etc.  I.e the fixture is aware of the database requirements.</li>
<li>The fixture should allow for several generations of itself to be created.  Thus from the test, several rows of data and the associated graph can be created to provide a rich enough set.  Rich enough to provide good data coverage without being complex or slow.</li>
<li>Finally labels, names and other data should be identifiable, this makes it easier to debug if required.</li>
</ul>
<p>So with careful thought, use of the builder pattern for the main fixture, immutable object design and a hierarchy of data and object creation I arrive at the finished product.  The design is strong, the test works and it satisfies the above requirements, but<strong> I am not happy.</strong></p>
<p>It took too long to hand craft all this code.  The fixture is big although easy to understand.  There has to be a better way.  So I look for an alternative.  What I want is something that provides the above as far as possible but lighter.  I envisaged, something where the data is configurable and you don&#8217;t have to write the complex fixture at all.</p>
<h2>Unitils a possible shortcut</h2>
<p>Quoting from the Unitils site: <cite>Unit tests for the database layer can be extremely valuable when building enterprise applications, but are often abandoned because of their complexity.<br />
</cite> How true that is!</p>
<p>So my search took me through the links at the bottom of the page, until I hit upon <strong>Unitils</strong>: <a title="Unitils.org Cookbook" href="http://unitils.org/cookbook.html" target="_blank">http://unitils.org/cookbook.html</a>.  Instead of writing a complex fixture to encapsulate the data safely you write XML that describes the data needed for a given test.  This is associated with the class or method using a naming strategy, although this can be overridden by specifying files.  This could be handy if one dataset fits several test classes.  This is already easier than writing actual insert statements and can be achieved easily with the database schema browser and a text editor.  I am not interested in the mocking or database setup described there, whilst useful I had solved most of those issues with spring.  In fact unitils uses spring under the hood, so is probably using the same facilities I do in my work.  Unitils provides some powerful aid with the assertions in the test too, take a look at this!</p>
<h3>ReflectionAssert</h3>
<p>The reflection assert class provides a toolkit that addresses the kind of problems you often run into when making assertions against the data a DAO returns.  For instance lets say you have a model object with a primary key value.  This field is often hidden from you, and may not be used in the equals method.  In fact the equals methods on model objects are not always implemented or have some business specific implementation, so you can&#8217;t rely on them in the tests.  My solution was to use my own holder objects for data, and then to write my own validation routines against the model object.  Time consuming!</p>
<p>Take a look at these examples taken directly from the tutorial, (thanks guys!)</p>
<pre class="brush: java; light: true">import static org.unitils.reflectionassert.ReflectionAssert.*;

// Exact field-by-field comparison
assertReflectionEquals(
  new Person("John", "Doe", new Address("New street", 5, "Brussels")),
  new Person("John", "Doe", new Address("New street", 5, "Brussels"));

// Ignore Null / 0 values in the expected object
assertReflectionEquals(
  new Person("John", null, new Address("New street", 0, null)),
  new Person("John", "Doe", new Address("New street", 5, "Brussels"),
ReflectionComparatorMode.IGNORE_DEFAULTS); 

// Ignore collection order
assertReflectionEquals(
Arrays.asList(
  new Person("John"), new Person("Jane")),
  new Person[] {new Person("Jane"), new Person("John")},
ReflectionComparatorMode.LENIENT_ORDER);

// Ignore null/0 values + collection order
assertLenientEquals(
  Arrays.asList(
  new Person("John"), null),
  new Person[] {new Person("Jane", "Doe"), new Person("John", "Doe")});

// Check only the firstName property
assertPropertyLenientEquals("firstName", Arrays.asList("John", "Jane"),
  new Person[] {new Person("Jane", "Doe"), new Person("John", "Doe")});</pre>
<h3>Comments on the assertion example</h3>
<ul>
<li>Note the way its possible to ignore null and defaults like &#8217;0&#8242; and certain fields.  This should mean I can use constructors on my model and not have to worry about keys.  These are tested because you get data back in the child tables anyway.</li>
<li>Note the system for ignoring order.  I use google multiset but this is even simpler than that.</li>
</ul>
<h3>General Problems that might still arise</h3>
<p>I am not sure if my model is always going to be so accommodating.  I hope that visibility of appropriate constructors will allow the assertions I want to make via reflection.  I guess there is little impact in adding more for testing, but my design meant I did not have to worry about it because my assertions are made against an object provided by the fixture.  In fact the design of this object was to facilitate creation without complex constructors.  A constraint the model does not have to worry about.  i.e Only the DAO needs to create a model object  This also had the advantage of reducing the failure to one point, the DAO.  In the system above, you type data into the XML and into the test, so its possible to miss the match and the test will fail.</p>
<p>It will be interesting to see if its possible to work with nested objects and complex graphs. JPA or currently Hibernate is knitting things together so it may not be possible to create the objects required.  Its going to take a bit longer to finish this off, so I will explore further and post up my finished result later on.</p>
<p>If I had a request it would be for this framework to load a model object off the xml defining the data, and have an assertions like this:</p>
<pre class="brush: java; light: true">public void validateModelLoadedFromTestDataAgainstReturnedModel(T y)</pre>
<p>This would close the loop would it not?</p>
<h2>Links</h2>
<p><a title="DBUnit" href="http://www.dallaway.com/acad/dbunit.html" target="_blank">http://www.dallaway.com/acad/dbunit.html</a></p>
<p><a title="Article from the server side describing a good test pattern for DAO's" href="http://www.theserverside.com/tt/articles/article.tss?l=UnitTesting" target="_blank">http://www.theserverside.com/tt/articles/article.tss?l=UnitTesting</a></p>
<p><a title="Unitils testing with JPA" href="http://unitils.org/tutorial.html#Testing_with_JPA" target="_blank">http://unitils.org/tutorial.html#Testing_with_JPA</a></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 114px; width: 1px; height: 1px;">http://www.theserverside.com/tt/articles/article.tss?l=UnitTestinghttp://www.theserverside.com/tt/articles/article.tss?l=UnitTesting</div>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F&amp;title=Lessons+on+testing+a+JPA+Dao" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F&amp;title=Lessons+on+testing+a+JPA+Dao" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F&amp;title=Lessons+on+testing+a+JPA+Dao" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F&amp;headline=Lessons+on+testing+a+JPA+Dao" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Lessons+on+testing+a+JPA+Dao&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Lessons+on+testing+a+JPA+Dao&amp;u=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Lessons+on+testing+a+JPA+Dao&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Lessons+on+testing+a+JPA+Dao&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Lessons+on+testing+a+JPA+Dao&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F&amp;title=Lessons+on+testing+a+JPA+Dao&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Flessons-on-testing-jpa-dao%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><div class="dzone_button" style="float: right; margin-left: 5px;">
<script type="text/javascript">
var dzone_url = 'http://martinaharris.com/2009/11/lessons-on-testing-jpa-dao/';
var dzone_title = 'Lessons on testing a JPA Dao';
var dzone_blurb = '';
var dzone_style = '2';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://martinaharris.com/2009/11/lessons-on-testing-jpa-dao/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 exciting things coming with Spring 3.0</title>
		<link>http://martinaharris.com/2009/11/5-things-spring-3-0/</link>
		<comments>http://martinaharris.com/2009/11/5-things-spring-3-0/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 05:00:00 +0000</pubDate>
		<dc:creator>Martin Harris</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[annotation]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://martinaharris.com/?p=129</guid>
		<description><![CDATA[In a previous blog entry I wrote about the now ancient announcement that spring 2.5 would be available. On the 2nd anniversary of that announcement I would like to examine the things I am looking forward to in Spring 3.0. &#8230; <a href="http://martinaharris.com/2009/11/5-things-spring-3-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://martinaharris.com/2009/11/5-reasons-to-upgrade-spring-to-2-5/" TARGET="_blank">previous blog entry</a> I wrote about the now ancient announcement that spring 2.5 would be available.  On the 2nd anniversary of that announcement I would like to examine the things I am looking forward to in Spring 3.0.</p>
<p><a href="http://www.springsource.org/node/2174" TARGET="_blank"><strong>Release Announcement:</strong> 13/11/2009</a></p>
<h3>5 cool things available in Spring 3.0</h3>
<ol>
<li>Java 5 fully used throughout the whole API.  In 2.5 the core is still Java 1.4 compatible, 3.0 is written in and requires Java 5.0.  This means much greater use of generics.  Unrelated but they have also included many performance enhancements.</li>
<li>SpEL.  Spring Expression Language gives access to nested bean definitions and system properties via #{…} syntax in property values.  These dynamic #{…} expressions and static ${…} placeholders can also be used to inject property settings via the @Value annotation.  This should much simplify property setting.</li>
<li>Comprehensive REST support.  Spring 2.5 MVC is an excellent pattern.  The simplicity of annotated controllers results in very clean implementations.  3.0 takes this system further by building in Restful support and a RestTemplate for clientside REST.</li>
<li>Spring 3.0 UI Field Formatting.  Springs formatting system has always been useful in web and desktop applications.  Its an effective way to remove a lot of boilerplate code from a system.  This new system of annotations allows common formats to be applied to classes, model properties and methods.  <a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/ch05s06.html#ui-format-Formatted-Annotation" TARGET="_blank">Check it out its very cool.</a></li>
<li>Many enhancements migrating to java.util.concurrent including ThreadPoolExecutorFactoryBean which exposes the native ExecutorService interface.  The concurrent package is very good indeed, so bringing more support into spring is just fantastic.</li>
</ol>
<p>Of the 5 mentioned here its only the tip of the iceberg as regards new features.  This release is very rich.  As usual with spring its when you have something to solve that you really appreciate it.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F&amp;title=5+exciting+things+coming+with+Spring+3.0" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F&amp;title=5+exciting+things+coming+with+Spring+3.0" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F&amp;title=5+exciting+things+coming+with+Spring+3.0" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F&amp;headline=5+exciting+things+coming+with+Spring+3.0" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=5+exciting+things+coming+with+Spring+3.0&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=5+exciting+things+coming+with+Spring+3.0&amp;u=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=5+exciting+things+coming+with+Spring+3.0&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=5+exciting+things+coming+with+Spring+3.0&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=5+exciting+things+coming+with+Spring+3.0&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F&amp;title=5+exciting+things+coming+with+Spring+3.0&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-things-spring-3-0%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><div class="dzone_button" style="float: right; margin-left: 5px;">
<script type="text/javascript">
var dzone_url = 'http://martinaharris.com/2009/11/5-things-spring-3-0/';
var dzone_title = '5 exciting things coming with Spring 3.0';
var dzone_blurb = '';
var dzone_style = '2';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://martinaharris.com/2009/11/5-things-spring-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Racing with Roo</title>
		<link>http://martinaharris.com/2009/11/racing-with-roo/</link>
		<comments>http://martinaharris.com/2009/11/racing-with-roo/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 23:17:43 +0000</pubDate>
		<dc:creator>Martin Harris</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[roo]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://martinaharris.com/?p=320</guid>
		<description><![CDATA[In my last post I said that I would have a deeper look at Spring Roo. Well I still have not quite done that. But I did have a race to see how long it would take me to get &#8230; <a href="http://martinaharris.com/2009/11/racing-with-roo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my last post I said that I would have a deeper look at Spring Roo.  Well I still have not quite done that.  But I did have a race to see how long it would take me to get my first website up and running with STS and Roo shell.  The previous night I downloaded STS, and today I installed it on my Linux server, all very smooth no issues.  Next I found a roo shell tutorial to follow: <a title="Roo Getting Started Part 2" href="http://blog.springsource.com/2009/05/27/roo-part-2/" target="_blank">Roo Shell Tutorial Part 2</a> from the SpringSource blog by Ben Alex.  This uses roo from the prompt, I am going to use the shell in STS.  The challenge is to follow the tutorial and take timings to get some understanding of how difficult it is to get going with Roo.</p>
<ol>
<li><strong>21:45</strong> Open Eclipse.</li>
<li><strong>21:49 </strong>Updates downloaded and maven re-indexed.</li>
<li><strong>21:53</strong> Start tutorial, lots of downloads from maven after project creation.</li>
<li><strong>21:55</strong> Restart eclipse to enable the runtime weaving, STS does not return&#8230;restarted it from the prompt, deleted the project and started again as it looked incomplete.</li>
<li><strong>22:00</strong> Bumbling through the tutorial.  This is very easy, love the CTRL^space completion.  I have done quite a bit of Linux work, and this shell is very easy to use.</li>
<li><strong>22:14 </strong>Running the tests using <strong>roo&gt; perform test</strong>. This runs maven, which fails because it cant find the integration test class, RsvpIntegrationTest.  Investigation from the bash prompt reveals that all tests pass under maven, so its not an issue with the project roo has created.  More download and fiddling about.  The test runs from eclipse too, so I move on.</li>
<li><strong>22:38</strong> Website up! Selenium tests all pass.  Investigation of the functionality shows that its working!  Done in 53 mins not bad I think!</li>
</ol>
<div id="attachment_323" class="wp-caption alignleft" style="width: 547px"><a href="http://martinaharris.com/wp-content/uploads/2009/11/rooRunning1.jpg"><img class="size-full wp-image-323" title="rooRunning1" src="http://martinaharris.com/wp-content/uploads/2009/11/rooRunning1.jpg" alt="Roo Up and Running!" width="537" height="144" /></a><p class="wp-caption-text">Roo Up and Running!</p></div>
<h2>Conclusion</h2>
<p>Yea easy, a quick look over the project shows its very neat and tidy.  Most of the time was spent in download and the false start.  The configuration easy to follow and the generated code would be easy to use.  So yes, might have a proper look at Roo at some point!  <img src='http://martinaharris.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F&amp;title=Racing+with+Roo" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F&amp;title=Racing+with+Roo" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F&amp;title=Racing+with+Roo" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F&amp;headline=Racing+with+Roo" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Racing+with+Roo&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Racing+with+Roo&amp;u=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Racing+with+Roo&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Racing+with+Roo&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Racing+with+Roo&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F&amp;title=Racing+with+Roo&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fracing-with-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><div class="dzone_button" style="float: right; margin-left: 5px;">
<script type="text/javascript">
var dzone_url = 'http://martinaharris.com/2009/11/racing-with-roo/';
var dzone_title = 'Racing with Roo';
var dzone_blurb = '';
var dzone_style = '2';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://martinaharris.com/2009/11/racing-with-roo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick look at the latest SpringSource STS and Roo</title>
		<link>http://martinaharris.com/2009/11/springsource-sts-and-roo/</link>
		<comments>http://martinaharris.com/2009/11/springsource-sts-and-roo/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 09:20:28 +0000</pubDate>
		<dc:creator>Martin Harris</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[annotation]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[roo]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://martinaharris.com/?p=312</guid>
		<description><![CDATA[Christian Dupuis from SpringSource shows some of the new features on the SpringIde Blog I used Spring STS for a few months before starting at Lab49, and found it to be a good distribution over the standard Eclipse build. It &#8230; <a href="http://martinaharris.com/2009/11/springsource-sts-and-roo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="Christian Dupuis" href="http://blog.springsource.com/author/cdupuis/" target="_blank">Christian Dupuis</a> from SpringSource shows some of the new features on the <a title="SpringIde Blog" href="http://springide.org/blog/" target="_blank">SpringIde Blog</a></p>
<p>I used Spring STS for a few months before starting at Lab49, and found it to be a good distribution over the standard Eclipse build.  It has lots of extra productivity features for Spring based development some of which are not available by downloading Spring plugins and adding them to a normal distribution.<br />
<strong>The things I like best are:</strong></p>
<ul>
<li>The edit, navigation and search systems now support the spring annotations.  So now you can navigate and search for beans declared via annotations.</li>
<li>Ability to include new XML domains in the spring configuration from a popup list.</li>
<li>The enhanced XML editing support now has inline error checking.</li>
<li>This XML editor also supports completion and checking of class and bean names.</li>
<li>Roo shell looks interesting too.</li>
</ul>
<p><strong><a title="SpringSource Roo Product Page" href="http://www.springsource.org/roo" target="_blank">Roo and Roo Shell</a></strong><br />
The Roo system looks great.  Its a system to generate and support a JEE system.  The roo shell can be used to configure JEE components.  You can have a basic website up in seconds.  Like Groovy and Grails you get spring standards built in, and your not dependent on the Roo system once your finished.</p>
<p>I am going to take a proper look at it at some point.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F&amp;title=Quick+look+at+the+latest+SpringSource+STS+and+Roo" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F&amp;title=Quick+look+at+the+latest+SpringSource+STS+and+Roo" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F&amp;title=Quick+look+at+the+latest+SpringSource+STS+and+Roo" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F&amp;headline=Quick+look+at+the+latest+SpringSource+STS+and+Roo" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Quick+look+at+the+latest+SpringSource+STS+and+Roo&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Quick+look+at+the+latest+SpringSource+STS+and+Roo&amp;u=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Quick+look+at+the+latest+SpringSource+STS+and+Roo&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Quick+look+at+the+latest+SpringSource+STS+and+Roo&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Quick+look+at+the+latest+SpringSource+STS+and+Roo&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F&amp;title=Quick+look+at+the+latest+SpringSource+STS+and+Roo&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fspringsource-sts-and-roo%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><div class="dzone_button" style="float: right; margin-left: 5px;">
<script type="text/javascript">
var dzone_url = 'http://martinaharris.com/2009/11/springsource-sts-and-roo/';
var dzone_title = 'Quick look at the latest SpringSource STS and Roo';
var dzone_blurb = '';
var dzone_style = '2';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://martinaharris.com/2009/11/springsource-sts-and-roo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Test anti-patterns project, contributors wanted!</title>
		<link>http://martinaharris.com/2009/11/anti-patterns-testing/</link>
		<comments>http://martinaharris.com/2009/11/anti-patterns-testing/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 05:00:28 +0000</pubDate>
		<dc:creator>Martin Harris</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[software quality]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[junit]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[quality]]></category>
		<category><![CDATA[re-factor]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://martinaharris.com/?p=236</guid>
		<description><![CDATA[I deliberately wrote a poor quality test, so that I could show how easy it is to re-factor it to a better one.  I was driven by having seen lots of such poor tests and to be honest I don't want to see another of its ilk again.  I might write a test like this myself, but I would <strong>never</strong> leave it like this.  Its part finished, littered with cut and paste, poorly named methods and hard coded values.

I show how to re-factor the test using several patterns for test fixtures.  The setup stage is often the worst bit of a bad test.  If you want to contribute some of your own bad tests and example improvements, <strong>read the blog, download the project and contribute!</strong> <a href="http://martinaharris.com/2009/11/anti-patterns-testing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Take a look at the following test class.  I deliberately wrote this poor quality test, so that I could show how easy it is to re-factor it to a better one.  I was driven by having seen lots of such poor tests and to be honest I don&#8217;t want to see another of its ilk again.  I might write a test like this myself, but I would <strong>never</strong> leave it like this.  Its part finished.  Its littered with cut and paste, poorly named methods and hard coded values.  It&#8217;s a bit like a surgeon performing an operation and not sewing up the hole!  I would go as far as to say that leaving tests in this state is unprofessional.  There is no excuse as most of the lessons of good naming and code re-use have been written down a long time back.  More lately in <a href="http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882">Clean Code by Robert C. Martin</a>.  I just don&#8217;t understand why people still write rubbish like this!  Possibly because they are allowed to get away with it!  Note that the test provides 100% coverage of the implementation class, but its not enough to stop there.</p>
<p>Have a read over the class, and then move on to read the steps to re-factor to better patterns.  I have several designs here that focus on the setup stage of a test.  As your tests get more complex you will find the patterns here support ever increasing complexity.  In an Agile project you might move from one system to the next as the requirements ramp up.  Then once you see where I am heading, I lay down a challenge.</p>
<h2>Test anti-patterns project, contributors wanted!</h2>
<p>If you have a Test Anti-Pattern that you would like to showcase.  Check out my code from gitHub, add the new example and examples of how to re-factor the code.  Blog it to your own blog with a reference to this page, or drop a comment.  If we get enough I will setup a page with an index to all the blogs.</p>
<p>The code can be<a href="http://help.github.com/forking/"> forked out with git</a> from gitHub <a href="http://github.com/mhgit/TerribleJavaTestingMadeGood">http://github.com/mhgit/TerribleJavaTestingMadeGood</a>.  It should be an easy start.  Its a full maven project with a small dependency set and maven site reports already built in for test coverage.  Its fully open source with the Apache 2.0 license.  Once you have your new example, tell me about it by adding a comment to this page, and following the git forking instructions for making a git pull available.</p>
<p><span id="more-236"></span></p>
<h2>I hope I never see another badly written test like this:</h2>
<p><cite>&#8230;but unfortunately I probably will&#8230; <img src='http://martinaharris.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> <cite></p>
<pre class="brush: java; gutter: false; wrap-lines: false">package org.testpatterns.dupcodeexample.lineutil.unit;

  import org.testpatterns.dupcodeexample.lineutil.SimplePage;
  import java.util.HashMap;
  import java.util.Map;
  import java.util.Set;
  import org.junit.Test;
  import static org.junit.Assert.*;

  /**
  * Terrible Test SimplePage Function.
  *
  * @author martinh
  */
  public class TerribleSimplePageTest {

    @Test
    public void testPageAssembley() {

        String item = "-23456789-";

        Map&lt;Integer, String&gt; expectedLines = new HashMap&lt;Integer, String&gt;();

        expectedLines.put(1, item + item + item + item + item);
        expectedLines.put(2, item + item + item + item + item);
        expectedLines.put(3, item + item + item + item + item);
        expectedLines.put(4, item + item + item + item + item);

        SimplePage page = SimplePage.newInstance(item, 20);
        Map&lt;Integer, String&gt; actualMap = page.getMap();

        assertEquals(expectedLines, actualMap);

    }

    @Test
    public void testPageKeySet() {

        String item = "-23456789-";

        Map&lt;Integer, String&gt; expectedLines = new HashMap&lt;Integer, String&gt;();

        expectedLines.put(1, item + item + item + item + item);
        expectedLines.put(2, item + item + item + item + item);
        expectedLines.put(3, item + item + item + item + item);
        expectedLines.put(4, item + item + item + item + item);

        SimplePage page = SimplePage.newInstance(item, 20);
        Set&lt;Integer&gt; actualKeySet = page.getKeySet();

        assertEquals(expectedLines.keySet(), actualKeySet);

    }

    @Test
    public void testAddLines() {

        String item = "-23456789-";

        SimplePage page = SimplePage.newInstance(item, 20);

        Map&lt;Integer, String&gt; additionalLines = new HashMap&lt;Integer, String&gt;();

        additionalLines.put(1, item + item + item + item + item);
        additionalLines.put(2, item + item + item + item + item);
        additionalLines.put(3, item + item + item + item + item);
        additionalLines.put(4, item + item + item + item + item);

        page.appendLines(item, 20);

        Map&lt;Integer, String&gt; actualMap = page.getMap();

        Map&lt;Integer, String&gt; expectedLines = new HashMap&lt;Integer, String&gt;();

        expectedLines.put(1, item + item + item + item + item);
        expectedLines.put(2, item + item + item + item + item);
        expectedLines.put(3, item + item + item + item + item);
        expectedLines.put(4, item + item + item + item + item);
        expectedLines.put(5, item + item + item + item + item);
        expectedLines.put(6, item + item + item + item + item);
        expectedLines.put(7, item + item + item + item + item);
        expectedLines.put(8, item + item + item + item + item);
        assertEquals(expectedLines, actualMap);

    }
}</pre>
<h2>Fixture as a normal method: ImprovedSimplePageTest</h2>
<p>I am not going to post up code for all the classes.  Check it out from gitHub for that.  So I just highlight the main steps and show the final full class.</p>
<p>The basis of the first pattern is simple.  Most small tests like this just need one method for setup, this eliminates all the cut and paste.  This might be run from an @Before, or @BeforeClass annotation, as part of the constructor or perhaps just from the test itself.  These techniques will have to be applied depending on what you need to achieve.  For instance if your setup is inserting into a database, you have to make sure your data does not violate db constraints.  So the annotations might not help, plus you have the added complexity of getting hold of your database.  A good pattern is to use an in memory db, but some of the annotations will cause the setup to get run before each test.  So in a nutshell attempt to have one setup, and its not that important which system you use to run it, that will depend on what your doing.</p>
<h3>Refactoring steps:</h3>
<ul>
<li>Rename methods.</li>
<p>Have a good strategy for your test names if they are good enough you will not need to comment the methods.  The pattern I use here is: [What is being tested]_[What is expected].  If you can&#8217;t fit it all into the name, the test is probably too big and needs breaking down.  A test should be concise.</p>
<li>Remove duplication.</li>
<ol>
There were two steps to this:</p>
<li>I Added this method: createLineExpectations to create expectations.</li>
<p>This allowed me to remove all the duplicated test setup that had been cut and pasted all through the class.  I wrote this bad test, using TDD to come up with the supporting implementation, so even as I wrote it the test went through several iterations.  During that process I left a chunk of unused map behind.  Which just goes to prove that if your test is messy, its difficult to spot problems.<br />
<strong>An unused chunk of code that hid in the duplications</strong></p>
<pre class="brush: java; light: true">  Map&lt;Integer, String&gt; additionalLines = new HashMap&lt;Integer, String&gt;();

  additionalLines.put(1, item + item + item + item + item);
  additionalLines.put(2, item + item + item + item + item);
  additionalLines.put(3, item + item + item + item + item);
  additionalLines.put(4, item + item + item + item + item);</pre>
<li>Added constants and moved all the hard coded value out.</li>
</ol>
</ul>
<h2>Collecting setup into an inner fixture class: LocalFixtureBasedPageTest</h2>
<p>Its not long before the technique starts to breakdown.  As you add more supporting methods it gets harder to see what is test, and what is setup.  So the next stage is to move the setup into an inner class.  This way, most ide&#8217;s will allow you to collapse the fixture hiding it away.  When I read a test, I am mostly interested in the expectations, not the setup.  Note that the constants have been moved into the fixture.  So the fixture becomes an inner class that supplies everything to do with setup for the test.</p>
<pre class="brush: java; light: true">    private class DataFixture {

        private final String ITEM = "-23456789-";
        private final int LINES_8 = 8;
        private final int LINES_4 = 4;

        Map&lt;Integer, String&gt; createLineExpectations(String item,
                int numLinesToCreate) {
            Map&lt;Integer, String&gt; expectedLines = Maps.newHashMap();

            StringBuilder sb = new StringBuilder();
            sb.append(item).append(item).append(item).append(item).append(item);
            String line = sb.toString();
            for (int i = 0; i &lt; numLinesToCreate; i++) {
                    expectedLines.put(i + 1, line);
            }

            return expectedLines;
        }
    }</pre>
<h2>Fixture as a spring injected component: SpringWiredSimplePageTest</h2>
<p>When a test gets more complex you sometimes end up with masses of complexity building up in inner classes.  I sometimes use inner classes to build complex data requirements using the <a href="http://www.factorypattern.com/method-chaining/">setter method chaining pattern</a> for instance.  Each inner class becoming a container for parameterized setup.  The next level of complexity is needing to share the setup over many test classes.</p>
<p><strong>These are your options.</strong></p>
<ol>
<li>Create a static helper class</li>
<p>Not a bad solution, but I hate having to access the methods via the class name.  Static classes often collect unrelated methods too.  Also, its often not possible to work with the restriction of being static.</p>
<li>Abstractions and class hierarchy.</li>
<p>This is often posed as a solution when you need to share the setup over many classes.  In this case its a terrible solution. The abstraction gets further complicated because your using the wrong OO mechanism.  It also means your test has to extend a class, in some situations, you are already extending to get at the internals of the object under test.</p>
<li>Use method injection to supply a fixture component.</li>
<p>If you break the fixture out to a component its easier to manage the complexity of the fixture away from the test with composition.  You can have many components each doing something specific for a set of tests.  You could even inject more than one component.  The design of the fixture can use other OO patterns to keep it neat.  For instance I once built a set of fixtures to supply ready made folder and file structures.  They all extended an abstract and implemented an interface.  The @Qualifier annotation was used to inject the correct implementation into the test.  On occasion a test used two of the component implementations.</ol>
<h3>Refactoring steps:</h3>
<ul>
<li>Move the Fixture inner class to its own component class.  If you get many of these its worth putting them in a separate project.</li>
<li>Add the @Component annotation from the spring project.</li>
<li>Change the type giving a more descriptive name.</li>
<li>Make the methods in the fixture public.</li>
<li>Better names for methods and types now that the fixture is not near the code that uses it.</li>
<li>Java doc for important methods.</li>
<li>Addition of getters for fields instead of direct access.</li>
<li>Improved createLineExpectations(int numLinesToCreate) by removing the dataItem, the fixture knows this data so no need to supply via method.</li>
<li>Convert to spring test. This means its possible to load in the spring configuration and autowire the test</li>
</ul>
<p>The test class markup to convert it into a spring test, and provide amongst other things auto wiring:</p>
<pre class="brush: java; light: true">
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:springAppConfig.xml")
@TestExecutionListeners({DependencyInjectionTestExecutionListener.class})
public class SpringWiredSimplePageTest {
</pre>
<p>Autowire the fixture, and spring will inject it:</p>
<pre class="brush: java; light: true">
@Autowired
    private PageDataFixture dataFixture;
</pre>
<p>Your test setup is then just called like this:</p>
<pre class="brush: java; light: true">
Map&lt;Integer, String&gt; expectedLines = dataFixture.createPageExpectation(NUMBER_LINES_ON_PAGE_4, NUMBER_DATA_ITEMS_IN_LINE_5);
</pre>
<h2>Conclusions</h2>
<p>Once you have a test that gives 100% coverage, there is usually some more time that needs to be spent on cleaning the code.  There are some easy patterns that can help, there is nothing in this article that is complex or difficult to understand so there is no excuse for leaving it messy.  Bugs hide in messy code and I think you would agree, the final result is very easy to read:<a href="http://github.com/mhgit/TerribleJavaTestingMadeGood/blob/master/testing-made-good/src/test/java/org/testpatterns/dupcodeexample/lineutil/unit/SpringWiredSimplePageTest.java" TARGET="_blank">SpringWiredSimplePageTest</a></p>
<h3>Thanks to&#8230;</h3>
<p>All the people I have worked with over the years, who have shown me better ways to write and test code.  You know who you are.  Many thanks.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F&amp;title=Test+anti-patterns+project%2C+contributors+wanted%21" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F&amp;title=Test+anti-patterns+project%2C+contributors+wanted%21" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F&amp;title=Test+anti-patterns+project%2C+contributors+wanted%21" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F&amp;headline=Test+anti-patterns+project%2C+contributors+wanted%21" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Test+anti-patterns+project%2C+contributors+wanted%21&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Test+anti-patterns+project%2C+contributors+wanted%21&amp;u=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Test+anti-patterns+project%2C+contributors+wanted%21&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Test+anti-patterns+project%2C+contributors+wanted%21&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Test+anti-patterns+project%2C+contributors+wanted%21&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F&amp;title=Test+anti-patterns+project%2C+contributors+wanted%21&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2Fanti-patterns-testing%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><div class="dzone_button" style="float: right; margin-left: 5px;">
<script type="text/javascript">
var dzone_url = 'http://martinaharris.com/2009/11/anti-patterns-testing/';
var dzone_title = 'Test anti-patterns project, contributors wanted!';
var dzone_blurb = '';
var dzone_style = '2';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://martinaharris.com/2009/11/anti-patterns-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 reasons to upgrade Spring from 2.0 to 2.5</title>
		<link>http://martinaharris.com/2009/11/5-reasons-to-upgrade-spring-to-2-5/</link>
		<comments>http://martinaharris.com/2009/11/5-reasons-to-upgrade-spring-to-2-5/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 23:12:19 +0000</pubDate>
		<dc:creator>Martin Harris</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[annotation]]></category>
		<category><![CDATA[junit]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://martinaharris.com/?p=122</guid>
		<description><![CDATA[The anniversary of the announcement that Spring 2.5 was available is just around the corner.  There are many reasons to upgrade the SpringFramework from 2.0 to 2.5.  Spring 2.5 is designed as a drop-in replacement for 2.0 so there are no valid technical arguments for not upgrading.  Here are my top 5 favorite features. <a href="http://martinaharris.com/2009/11/5-reasons-to-upgrade-spring-to-2-5/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The 2nd anniversary of the announcement that Spring 2.5 was available is just around the corner.  There are many reasons to upgrade the SpringFramework from 2.0 to 2.5.  Spring 2.5 is designed as a drop-in replacement for 2.0 so there are no valid technical arguments for not upgrading.</p>
<p><a href="http://www.springsource.org/node/561" TARGET="_blank"><strong>Release Announcement:</strong> 19/11/2007</a></p>
<p>I don&#8217;t want to review all the improvements that were made, but thought it would be interesting to pick a favorite feature and explain why for me its the best feature.  Perhaps some of the few remaining projects out there will move up and start taking advantage of this fantastic framework.  After all, with the <a href="http://blog.springsource.com/2009/09/29/spring-framework-3-0-rc1-released/" TARGET="_blank">release notice for 3.0 RC1</a> back in September soon there will be reasons to upgrade again!  </p>
<p><span id="more-122"></span></p>
<p>I have seen a few of these upgrades through now, and so far they have all been straightforward.  The work is not in the upgrade, its in the work to use the features.  This can be done over time to reduce the impact.  The last one I did for instance was mainly re-factors to use generics which is never a bad idea, and conversion of tests to use the new annotation based Junit 4 framework.</p>
<h3>So, my top 5 candidates for Favorite Upgrade Feature.</h3>
<ol>
<li>Takes advantage of new language features in Java 5 and 6.  This includes adherence to JDBC 4.0, JTA 1.1, JavaMail 1.4 and JAX-WS 2.0.  The addition of Generics in the high level API is a particular boon.  The core is still compatible with Java 1.4, but the addition of Generics in the higher level API&#8217;s means you can take full advantage of generics in most of the important areas.  If your already on Java 5 you can get rid of masses of warnings, or all those dangerous suppressions.  The code gets cleaner and more of your casts will be checked upfront.  For me this is a huge development productivity enhancement. </li>
<li>Greater use of annotations in configuration.  This is particularly useful for wiring of web services and the MVC controller.  The new @Qualifier annotation is essential when Auto-wiring beans and needing to choose from multiple beans of the same type.  Not such a massive deal for me, as I like the way that xml provides a map of the application.  Well if its well structured it does.  There are some places that annotations are excellent though and the MVC layer is just that, as it allows you to see exactly what a controller is doing.  What it responds to, and how it redirects.  The new way to implement the get, post, redirect pattern is awesome more detail in the <a href="http://static.springsource.org/spring/docs/2.5.x/reference/mvc.html#mvc-annotation" TARGET="_blank">MVC API Documentation</a>.</li>
<li>Better JDBC Support including better handling of errors and the new SimpleJDBCTemplate.  Oh! and the addition of named parameter support is very handy indeed.</li>
<li>New annotation based support the Junit and Nunit integration testing.  This includes new classes for spring integration testing, and removes the need to extend from the TestCase framework.  The net result of this is greater test flexibility, easier configuration and the ability to easily inject fixture dependency and share test support utilities.</li>
<li>Increased performance.  Not sure what the specific changes are but I quote from their website: <cite>We recommend upgrading to Spring 2.5 from all previous Spring 2.0.x versions in order to benefit from the new features as well as the significant performance enhancements that Spring 2.5 has to offer.</cite?</li>
</ol>
<p>For me the winner is <strong>point 1, Java 5 language features</strong>, but it was a hard decision.  I have seen an incomprehensible test framework re-factored into something manageable.  It was made possible by <strong>point 4</strong>.  The simplicity these two features bring to the code should be argument enough to begin your upgrade in the next iteration.  Go for it!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F&amp;title=5+reasons+to+upgrade+Spring+from+2.0+to+2.5" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F&amp;title=5+reasons+to+upgrade+Spring+from+2.0+to+2.5" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F&amp;title=5+reasons+to+upgrade+Spring+from+2.0+to+2.5" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F&amp;headline=5+reasons+to+upgrade+Spring+from+2.0+to+2.5" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=5+reasons+to+upgrade+Spring+from+2.0+to+2.5&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=5+reasons+to+upgrade+Spring+from+2.0+to+2.5&amp;u=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=5+reasons+to+upgrade+Spring+from+2.0+to+2.5&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=5+reasons+to+upgrade+Spring+from+2.0+to+2.5&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=5+reasons+to+upgrade+Spring+from+2.0+to+2.5&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F&amp;title=5+reasons+to+upgrade+Spring+from+2.0+to+2.5&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F11%2F5-reasons-to-upgrade-spring-to-2-5%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><div class="dzone_button" style="float: right; margin-left: 5px;">
<script type="text/javascript">
var dzone_url = 'http://martinaharris.com/2009/11/5-reasons-to-upgrade-spring-to-2-5/';
var dzone_title = '5 reasons to upgrade Spring from 2.0 to 2.5';
var dzone_blurb = '';
var dzone_style = '2';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://martinaharris.com/2009/11/5-reasons-to-upgrade-spring-to-2-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring Integration in Action available now</title>
		<link>http://martinaharris.com/2009/10/spring-integration-in-action-available/</link>
		<comments>http://martinaharris.com/2009/10/spring-integration-in-action-available/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 21:34:25 +0000</pubDate>
		<dc:creator>Martin Harris</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[integration]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://martinaharris.com/?p=47</guid>
		<description><![CDATA[Jonas Partner has just announced that Spring Integration in Action is now available via the Manning early access program on  <A href="http://www.jonaspartner.com/?p=312" TARGET="_blank">his blog</a> <a href="http://martinaharris.com/2009/10/spring-integration-in-action-available/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Jonas Partner has just announced that Spring Integration in Action is now available via the Manning early access program on  <A href="http://www.jonaspartner.com/?p=312" TARGET="_blank">his blog</a>.</p>
<p>The spring integration project embodies principles found in the Spring Framework and Enterprise Integration Patterns (Hohpe and Woolf, 2003).  The book and project are worth a look for anyone working in that space.</p>
<ul>
<li><A href="http://www.springsource.org/spring-integration" TARGET="_blank">Spring Integration Project</a></li>
<li><A href="http://www.manning.com/fisher/" TARGET="_blank">Spring Integration in Action, Manning Early Access Program</a></li>
</ul>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F&amp;title=Spring+Integration+in+Action+available+now" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F&amp;title=Spring+Integration+in+Action+available+now" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F&amp;title=Spring+Integration+in+Action+available+now" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F&amp;headline=Spring+Integration+in+Action+available+now" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Spring+Integration+in+Action+available+now&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Spring+Integration+in+Action+available+now&amp;u=http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Spring+Integration+in+Action+available+now&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Spring+Integration+in+Action+available+now&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Spring+Integration+in+Action+available+now&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F&amp;title=Spring+Integration+in+Action+available+now&amp;summary=&amp;source=" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fmartinaharris.com%2F2009%2F10%2Fspring-integration-in-action-available%2F" target="_blank"><img class="lightsocial_img" src="http://martinaharris.com/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div><div class="dzone_button" style="float: right; margin-left: 5px;">
<script type="text/javascript">
var dzone_url = 'http://martinaharris.com/2009/10/spring-integration-in-action-available/';
var dzone_title = 'Spring Integration in Action available now';
var dzone_blurb = '';
var dzone_style = '2';
</script>
<script language="javascript" src="http://widgets.dzone.com/links/widgets/zoneit.js"></script>
</div>]]></content:encoded>
			<wfw:commentRss>http://martinaharris.com/2009/10/spring-integration-in-action-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

