<?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>Christophe Coenraets&#187; Java</title>
	<atom:link href="http://coenraets.org/blog/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://coenraets.org/blog</link>
	<description>Mobile, Cloud, HTML, JavaScript, Java, PHP, Flex</description>
	<lastBuildDate>Fri, 03 Feb 2012 05:02:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using Backbone.js with a RESTful Java Back-End</title>
		<link>http://coenraets.org/blog/2012/01/using-backbone-js-with-a-restful-java-back-end/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-backbone-js-with-a-restful-java-back-end</link>
		<comments>http://coenraets.org/blog/2012/01/using-backbone-js-with-a-restful-java-back-end/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 17:39:44 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Backbone.js]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JAX-RS]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=2765</guid>
		<description><![CDATA[In a previous post, RESTful services with jQuery and Java using JAX-RS and Jersey, I demonstrated how to build a RESTful API using JAX-RS and Jersey, and how to build a jQuery application that leverages that API. The application used as an example was a Wine Cellar management application. In follow-up posts, &#8220;Backbone.js Wine Cellar [...]
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Using Backbone.js with a RESTful Java Back-End http://coenraets.org/blog/?p=2765" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2012%2F01%2Fusing-backbone-js-with-a-restful-java-back-end%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></description>
			<content:encoded><![CDATA[<p><a href="http://coenraets.org/blog/wp-content/uploads/2012/01/backbone-java4.jpg"><img src="http://coenraets.org/blog/wp-content/uploads/2012/01/backbone-java4.jpg" alt="" title="backbone-java4" width="428" height="148" class="aligncenter size-full wp-image-2792" /></a></p>
<p>In a previous post, <a href="http://coenraets.org/blog/2011/12/restful-services-with-jquery-and-java-using-jax-rs-and-jersey/">RESTful services with jQuery and Java using JAX-RS and Jersey</a>, I demonstrated how to build a RESTful API using JAX-RS and Jersey, and how to build a jQuery application that leverages that API. The application used as an example was a Wine Cellar management application.</p>
<p>In follow-up posts, &#8220;Backbone.js Wine Cellar Tutorial&#8221; (<a href="http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-tutorial-part-1-getting-started/">part1</a>, <a href="http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-tutorial-part-2-crud/">part 2</a>, <a href="http://coenraets.org/blog/2011/12/backbone-js-wine-cellar-tutorial-part-3-deep-linking-and-application-states/">part 3</a>), I showed how to add structure to the client-side of the Wine Cellar application using <a href="http://documentcloud.github.com/backbone/">Backbone.js</a>. But that three-part tutorial was provided with a PHP back-end.</p>
<p>By popular demand, here is a version of the Backbone.js Wine Cellar application powered by a Java / JAX-RS back-end using Jersey. The server-side of the application provides an example of building a complete RESTful API in Java using the different HTTP methods:<br />
<span id="more-2765"></span></p>
<ul>
<li><strong>GET</strong> to retrieve and search wines</li>
<li><strong>POST</strong> to add a wine</li>
<li><strong>PUT</strong> to update a wine</li>
<li><strong>DELETE</strong> to delete a wine</li>
</ul>
<p>As already mentioned, the client-side of the application provides an example of adding structure to your JavaScript code using the Backbone.js Model, View and Router components. To learn more about the Backbone.js implementation, refer to the three part tutorial mentioned above: it is entirely back-end agnostic. </p>
<p>The source code for this application is hosted on GitHub <a href="https://github.com/ccoenraets/backbone-jax-cellar">here</a>. It consists of the Eclipse Dynamic Web Project with the source code for both the Java back-end and JavaScript/Backbone.js client.</p>
<p>You can run the application (Part 3) <a href="http://coenraets.org/backbone-cellar/part3/">here</a>. The create/update/delete features are disabled in this online version.</p>
<p>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"  data-lang="en"  data-url="http://coenraets.org/blog/2012/01/using-backbone-js-with-a-restful-java-back-end/"></a>
<!-- End WP Socializer Plugin - Retweet Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - +1 Button -->
<g:plusone size="medium" href="http://coenraets.org/blog/2012/01/using-backbone-js-with-a-restful-java-back-end/" ></g:plusone>
<!-- End WP Socializer Plugin - +1 Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Facebook Button -->
<iframe src="http://www.facebook.com/plugins/like.php?&amp;href=http://coenraets.org/blog/2012/01/using-backbone-js-with-a-restful-java-back-end/&amp;layout=button_count&amp;show_faces=0&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>
<!-- End WP Socializer Plugin - Facebook Button -->
</span>
</p>
<p>
<a href="https://twitter.com/ccoenraets" class="twitter-follow-button" data-show-count="false" data-lang="en" data-size="large">Follow @ccoenraets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Using Backbone.js with a RESTful Java Back-End http://coenraets.org/blog/?p=2765" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2012%2F01%2Fusing-backbone-js-with-a-restful-java-back-end%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2012/01/using-backbone-js-with-a-restful-java-back-end/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>RESTful services with jQuery and Java using JAX-RS and Jersey</title>
		<link>http://coenraets.org/blog/2011/12/restful-services-with-jquery-and-java-using-jax-rs-and-jersey/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=restful-services-with-jquery-and-java-using-jax-rs-and-jersey</link>
		<comments>http://coenraets.org/blog/2011/12/restful-services-with-jquery-and-java-using-jax-rs-and-jersey/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 15:28:51 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JAX-RS]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=2244</guid>
		<description><![CDATA[NOTE: This is the Java version of this article and its companion app. A PHP version is available here. This is a more in depth version of my previous post on the same topic. The previous article only covered the HTTP GET method for building RESTful services. This article (and its new companion app) provides [...]
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ RESTful services with jQuery and Java using JAX-RS and Jersey http://coenraets.org/blog/?p=2244" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2011%2F12%2Frestful-services-with-jquery-and-java-using-jax-rs-and-jersey%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></description>
			<content:encoded><![CDATA[<p>NOTE: This is the Java version of this article and its companion app. A PHP version is available <a href="http://coenraets.org/blog/2011/12/restful-services-with-jquery-php-and-the-slim-framework/">here</a>.</p>
<p>This is a more in depth version of my <a href="http://coenraets.org/blog/2011/11/building-apps-with-jquery-and-jax-rs-sample-app/">previous post</a> on the same topic. The previous article only covered the HTTP GET method for building RESTful services. This article (and its new  companion app) provides an example of building a complete RESTful API using the different HTTP methods:</p>
<ul>
<li><strong>GET</strong> to retrieve and search data</li>
<li><strong>POST</strong> to add data</li>
<li><strong>PUT</strong> to update data</li>
<li><strong>DELETE</strong> to delete data</li>
</ul>
<p>The application used as an example for this article is a Wine Cellar app. You can search for wines, add a wine to your cellar, update and delete wines.</p>
<p><a href="http://coenraets.org/cellar"><img src="http://coenraets.org/blog/wp-content/uploads/2011/12/cellar2.jpg" alt="" title="cellar2" width="640" height="496" class="alignnone size-full wp-image-2392" /></a><br />
You can run the application <a href="http://coenraets.org/cellar">here</a>. The create/update/delete features are disabled in this online version. Use the link at the bottom of this post to download a fully enabled version.<br />
<span id="more-2244"></span><br />
The REST API consists of the following methods:</p>
<table style="border-collapse:collapse;">
<tr>
<th style="padding:4px;border: 1px solid #666666;">Method</th>
<th style="padding:4px;border: 1px solid #666666;">URL</th>
<th style="padding:4px;border: 1px solid #666666;">Action</th>
</tr>
<tr>
<td style="padding:4px;border: 1px solid #666666;">GET</td>
<td style="padding:4px;border: 1px solid #666666;">/api/wines</td>
<td style="padding:4px;border: 1px solid #666666;">Retrieve all wines</td>
</tr>
<tr>
<td style="padding:4px;border: 1px solid #666666;">GET</td>
<td style="padding:4px;border: 1px solid #666666;">/api/wines/search/Chateau
<td style="padding:4px;border: 1px solid #666666;">Search for wines with &#8216;Chateau&#8217; in their name</td>
</tr>
<tr>
<td style="padding:4px;border: 1px solid #666666;">GET</td>
<td style="padding:4px;border: 1px solid #666666;">/api/wines/10
<td style="padding:4px;border: 1px solid #666666;">Retrieve wine with id == 10</td>
</tr>
<tr>
<td style="padding:4px;border: 1px solid #666666;">POST</td>
<td style="padding:4px;border: 1px solid #666666;">/api/wines</td>
<td style="padding:4px;border: 1px solid #666666;">Add a new wine</td>
</tr>
<tr>
<td style="padding:4px;border: 1px solid #666666;">PUT</td>
<td style="padding:4px;border: 1px solid #666666;">/api/wines/10</td>
<td style="padding:4px;border: 1px solid #666666;">Update wine with id == 10</td>
</tr>
<tr>
<td style="padding:4px;border: 1px solid #666666;">DELETE</td>
<td style="padding:4px;border: 1px solid #666666;">/api/wines/10</td>
<td style="padding:4px;border: 1px solid #666666;">Delete wine with id == 10</td>
</tr>
</table>
<p>&nbsp;</p>
<h4>Implementing the API using JAX-RS</h4>
<p>JAX-RS makes it easy to implement this API in Java. You simply create a class defined as follows:</p>
<pre class="brush: java; title: ; notranslate">
package org.coenraets.cellar;

@Path(&quot;/wines&quot;)
public class WineResource {

	WineDAO dao = new WineDAO();

	@GET
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public List&lt;Wine&gt; findAll() {
		return dao.findAll();
	}

	@GET @Path(&quot;search/{query}&quot;)
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public List&lt;Wine&gt; findByName(@PathParam(&quot;query&quot;) String query) {
		return dao.findByName(query);
	}

	@GET @Path(&quot;{id}&quot;)
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public Wine findById(@PathParam(&quot;id&quot;) String id) {
		return dao.findById(Integer.parseInt(id));
	}

	@POST
	@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public Wine create(Wine wine) {
		return dao.create(wine);
	}

	@PUT @Path(&quot;{id}&quot;)
	@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public Wine update(Wine wine) {
		return dao.update(wine);
	}

	@DELETE @Path(&quot;{id}&quot;)
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public void remove(@PathParam(&quot;id&quot;) int id) {
		dao.remove(id);
	}
}
</pre>
<p>Quick look at the JAX-RS annotations used in this class:</p>
<ul>
<li><strong>@GET</strong>, <strong>@POST</strong>, <strong>@PUT</strong>, <strong>@DELETE</strong>: HTTP method the class method responds to.</li>
<li><strong>@Path</strong>: path the method responds to.</li>
<li><strong>@Consumes</strong>: type of data the method can take as input. The data will automatically be deserialized into a method input parameter. For example, you can pass a wine object to the addWined() method either as JSON or XML. The JSON or XML representation of a new wine is automatically deserialized into the Wine object passed as an argument to the method.</li>
<li><strong>@Produces</strong>: One or more response content type(s) the method can generate. The method&#8217;s return value will be automatically serialized using the content type requested by the client. If the client didn&#8217;t request a specific content type, the first content type listed in the @Produces annotation will be used. For example, if you access http://coenraets.org/rest/wines, you get a list of wines represented as JSON because it is the first content type listed in the @Produces annotation of the findAll() method.</li>
</ul>
<p>The jQuery client below sends data to the server using JSON (addWine() and updateWine() methods).</p>
<p>The approach you use to actually retrieve the data is totally up to you. In this example, I use a simple DAO, but you can of course use your own data access solution.</p>
<h4>Testing the API using cURL</h4>
<p>If you want to test your API before using it in a client application, you can invoke your REST services straight from a browser address bar. For example, you could try:</p>
<ul>
<li><a href="http://localhost:8080/cellar/rest/wines">http://localhost:8080/cellar/rest/wines</a></li>
<li><a href="http://localhost:8080/cellar/rest/wines/search/Chateau">http://localhost:8080/cellar/rest/wines/search/Chateau</a></li>
<li><a href="http://localhost:8080/cellar/rest/wines/5">http://localhost:8080/cellar/rest/wines/5</a></li>
</ul>
<p>You will only be able to test your GET services that way, and even then, it doesn&#8217;t give you full control to test all the content types your API can return.</p>
<p>A more versatile solution to test RESTful services is to use <a href="http://curl.haxx.se/">cURL</a>, a command line utility for transferring data with URL syntax.</p>
<p>For example, using cURL, you can test the Wine Cellar API with the following commands:</p>
<ul>
<li>Get all wines returned as default content type:
<pre class="brush: bash; gutter: false; title: ; wrap-lines: true; notranslate">
curl -i -X GET http://localhost:8080/cellar/rest/wines
</pre>
</li>
<li>Get all wines returned as xml:
<pre class="brush: bash; gutter: false; title: ; wrap-lines: true; notranslate">
curl -i -X GET http://localhost:8080/cellar/rest/wines -H 'Accept:application/xml'
</pre>
<li>Get all wines with &#8216;chateau&#8217; in their name:
<pre class="brush: bash; gutter: false; title: ; wrap-lines: true; notranslate">
curl -i -X GET http://localhost:8080/cellar/rest/wines/search/chateau
</pre>
</li>
<li>Get wine #5:
<pre class="brush: bash; gutter: false; title: ; wrap-lines: true; notranslate">
curl -i -X GET http://localhost:8080/cellar/rest/wines/5
</pre>
</li>
<li>Delete wine #5:
<pre class="brush: bash; gutter: false; title: ; wrap-lines: true; notranslate">
curl -i -X DELETE http://localhost:8080/cellar/rest/wines/5
</pre>
</li>
<li>Add a new wine:
<pre class="brush: bash; gutter: false; title: ; wrap-lines: true; notranslate">
curl -i -X POST -H 'Content-Type: application/json' -d '{&quot;name&quot;: &quot;New Wine&quot;, &quot;year&quot;: &quot;2009&quot;}' http://localhost:8080/cellar/rest/wines
</pre>
</li>
<li>Modify wine #27:
<pre class="brush: bash; gutter: false; title: ; wrap-lines: true; notranslate">
curl -i -X PUT -H 'Content-Type: application/json' -d '{&quot;id&quot;: &quot;27&quot;, &quot;name&quot;: &quot;New Wine&quot;, &quot;year&quot;: &quot;2010&quot;}' http://localhost:8080/cellar/rest/wines/27
</pre>
</li>
</ul>
<h4>The jQuery Client</h4>
<p>Accessing your API through cURL is cool, but there is nothing like a real application to put your API to the test. So the source code (available for download at the end of this post) includes a simple jQuery client to manage your wine cellar.</p>
<p>Here is the jQuery code involved in calling the services:</p>
<pre class="brush: jscript; title: ; notranslate">
function findAll() {
	$.ajax({
		type: 'GET',
		url: rootURL,
		dataType: &quot;json&quot;, // data type of response
		success: renderList
	});
}

function findByName(searchKey) {
	$.ajax({
		type: 'GET',
		url: rootURL + '/search/' + searchKey,
		dataType: &quot;json&quot;,
		success: renderList
	});
}

function findById(id) {
	$.ajax({
		type: 'GET',
		url: rootURL + '/' + id,
		dataType: &quot;json&quot;,
		success: function(data){
			$('#btnDelete').show();
			renderDetails(data);
		}
	});
}

function addWine() {
	console.log('addWine');
	$.ajax({
		type: 'POST',
		contentType: 'application/json',
		url: rootURL,
		dataType: &quot;json&quot;,
		data: formToJSON(),
		success: function(data, textStatus, jqXHR){
			alert('Wine created successfully');
			$('#btnDelete').show();
			$('#wineId').val(data.id);
		},
		error: function(jqXHR, textStatus, errorThrown){
			alert('addWine error: ' + textStatus);
		}
	});
}

function updateWine() {
	$.ajax({
		type: 'PUT',
		contentType: 'application/json',
		url: rootURL + '/' + $('#wineId').val(),
		dataType: &quot;json&quot;,
		data: formToJSON(),
		success: function(data, textStatus, jqXHR){
			alert('Wine updated successfully');
		},
		error: function(jqXHR, textStatus, errorThrown){
			alert('updateWine error: ' + textStatus);
		}
	});
}

function deleteWine() {
	console.log('deleteWine');
	$.ajax({
		type: 'DELETE',
		url: rootURL + '/' + $('#wineId').val(),
		success: function(data, textStatus, jqXHR){
			alert('Wine deleted successfully');
		},
		error: function(jqXHR, textStatus, errorThrown){
			alert('deleteWine error');
		}
	});
}

// Helper function to serialize all the form fields into a JSON string
function formToJSON() {
	return JSON.stringify({
		&quot;id&quot;: $('#id').val(),
		&quot;name&quot;: $('#name').val(),
		&quot;grapes&quot;: $('#grapes').val(),
		&quot;country&quot;: $('#country').val(),
		&quot;region&quot;: $('#region').val(),
		&quot;year&quot;: $('#year').val(),
		&quot;description&quot;: $('#description').val()
		});
}
</pre>
<p>&nbsp;</p>
<h4>Download the Source Code</h4>
<p>The source code for this application is hosted on GitHub <a href="https://github.com/ccoenraets/wine-cellar-java">here</a>. And <a href="https://github.com/ccoenraets/wine-cellar-java/zipball/master">here</a> is a quick link to the project download (Eclipse Dynamic Web Project). It includes both the Java and jQuery code for the application.</p>
<p><strong>UPDATE (1/11/2012):</strong> A version of this application using Backbone.js at the client-side is also available on GitHub <a href="https://github.com/ccoenraets/backbone-jax-cellar">here</a>. You can find more information on the Backbone.js of this application <a href="http://coenraets.org/blog/2012/01/using-backbone-js-with-a-restful-java-back-end/">here</a>.</p>
<p>I&#8217;m interested in your feedback. Let me know what you think and what your experience has been building RESTful-based applications using Java and jQuery.</p>
<p>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"  data-lang="en"  data-url="http://coenraets.org/blog/2011/12/restful-services-with-jquery-and-java-using-jax-rs-and-jersey/"></a>
<!-- End WP Socializer Plugin - Retweet Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - +1 Button -->
<g:plusone size="medium" href="http://coenraets.org/blog/2011/12/restful-services-with-jquery-and-java-using-jax-rs-and-jersey/" ></g:plusone>
<!-- End WP Socializer Plugin - +1 Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Facebook Button -->
<iframe src="http://www.facebook.com/plugins/like.php?&amp;href=http://coenraets.org/blog/2011/12/restful-services-with-jquery-and-java-using-jax-rs-and-jersey/&amp;layout=button_count&amp;show_faces=0&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>
<!-- End WP Socializer Plugin - Facebook Button -->
</span>
</p>
<p>
<a href="https://twitter.com/ccoenraets" class="twitter-follow-button" data-show-count="false" data-lang="en" data-size="large">Follow @ccoenraets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ RESTful services with jQuery and Java using JAX-RS and Jersey http://coenraets.org/blog/?p=2244" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2011%2F12%2Frestful-services-with-jquery-and-java-using-jax-rs-and-jersey%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2011/12/restful-services-with-jquery-and-java-using-jax-rs-and-jersey/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Building Apps with jQuery and JAX-RS &#8211; Sample App</title>
		<link>http://coenraets.org/blog/2011/11/building-apps-with-jquery-and-jax-rs-sample-app/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=building-apps-with-jquery-and-jax-rs-sample-app</link>
		<comments>http://coenraets.org/blog/2011/11/building-apps-with-jquery-and-jax-rs-sample-app/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 18:12:10 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JAX-RS]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Sample App]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=2067</guid>
		<description><![CDATA[In my previous post, I discussed the process of building RESTful services in Java using JAX-RS and Jersey. As an example, I shared a web application that provides a simple RESTful API for an Employee directory application: /rest/employees &#8212; Returns all employees /rest/employees/1 &#8212; Returns an employee identified by id (employee 1 in this case) [...]
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Building Apps with jQuery and JAX-RS &#8211; Sample App http://coenraets.org/blog/?p=2067" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2011%2F11%2Fbuilding-apps-with-jquery-and-jax-rs-sample-app%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://coenraets.org/blog/2011/11/building-restful-services-with-java-using-jax-rs-and-jersey-sample-application/">previous post</a>, I discussed the process of building RESTful services in Java using JAX-RS and <a href="http://jersey.java.net/">Jersey</a>.  As an example, I shared a web application that provides a simple RESTful API for an Employee directory application:</p>
<ul>
<li><a href="http://coenraets.org/rest/employees">/rest/employees</a> &#8212; Returns all employees</li>
<li><a href="http://coenraets.org/rest/employees/1">/rest/employees/1</a> &#8212; Returns an employee identified by id (employee 1 in this case)</li>
<li><a href="http://coenraets.org/rest/employees/1/reports">/rest/employees/1/reports</a> &#8212; Returns direct reports of an employee (employee 1 in this case)</li>
</ul>
<p>In this post, I share a simple client application that uses these services to provide a basic User Interface for the application. The client is built with jQuery and uses JSON as the data exchange format.<br />
<span id="more-2067"></span><br />
Accessing the JAX-RS REST services using jQuery is easy. For example, here is the function used to retrieve and display a list of employees:</p>
<pre class="brush: jscript; title: ; notranslate">
function getEmployeeList() {
	$.getJSON('http://localhost/directory/rest/employees', function(data) {
		$('#employeeList li').remove();
		var employees = data.employee;
		$.each(employees, function(index, employee) {
			$('#employeeList').append(
				'&lt;li&gt;&lt;a href=&quot;employeedetails.html#' + employee.id + '&quot;&gt;'
				+ employee.firstName + ' ' + employee.lastName + ' ('
				+ employee.title + ')&lt;/a&gt;&lt;/li&gt;');
		});
	});
}
</pre>
<p>Retrieving the data &#8220;Ajax-style&#8221; has many benefits:</p>
<ul>
<li>Your UI code doesn’t have a dependency on a specific server-side technology.</li>
<li>Your data access logic doesn’t have a dependency on a specific UI technology.</li>
<li>You can manipulate the data on the client side (i.e. sort using different criteria) without reloading the page.</li>
<li>That decoupled architecture also works offline when working with a local database.</li>
<li>You don&#8217;t have to reload a page to change the data it displays.</li>
</ul>
<p>As an illustration of the last bullet, the application uses the &#8220;employeedetails.html&#8221; page to navigate up and down the org chart (when the user clicks on an employee&#8217;s manager link or on one if his/her direct reports). When that happens, the application just loads another employee object in the same page without reloading it.</p>
<h4>Run the Application</h4>
<p>Click <a href="http://coenraets.org/apps/directory/jqjaxrs/">here</a> to run the application. The UI is intentionally plain. I&#8217;ll provide a more sophisticated UI in my next post.</p>
<h4>Download the Source Code</h4>
<p>Click <a href="http://coenraets.org/apps/directory/jqjaxrs/jqjaxrs.zip">here</a> to download the source code (full Eclipse dynamic web project) or <a href="http://coenraets.org/apps/directory/jqjaxrs/jqjaxrsclient.zip">here</a> to download the html and js files only.</p>
<p>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"  data-lang="en"  data-url="http://coenraets.org/blog/2011/11/building-apps-with-jquery-and-jax-rs-sample-app/"></a>
<!-- End WP Socializer Plugin - Retweet Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - +1 Button -->
<g:plusone size="medium" href="http://coenraets.org/blog/2011/11/building-apps-with-jquery-and-jax-rs-sample-app/" ></g:plusone>
<!-- End WP Socializer Plugin - +1 Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Facebook Button -->
<iframe src="http://www.facebook.com/plugins/like.php?&amp;href=http://coenraets.org/blog/2011/11/building-apps-with-jquery-and-jax-rs-sample-app/&amp;layout=button_count&amp;show_faces=0&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>
<!-- End WP Socializer Plugin - Facebook Button -->
</span>
</p>
<p>
<a href="https://twitter.com/ccoenraets" class="twitter-follow-button" data-show-count="false" data-lang="en" data-size="large">Follow @ccoenraets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Building Apps with jQuery and JAX-RS &#8211; Sample App http://coenraets.org/blog/?p=2067" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2011%2F11%2Fbuilding-apps-with-jquery-and-jax-rs-sample-app%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2011/11/building-apps-with-jquery-and-jax-rs-sample-app/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Building RESTful Services with Java Using JAX-RS and Jersey &#8212; Sample Application</title>
		<link>http://coenraets.org/blog/2011/11/building-restful-services-with-java-using-jax-rs-and-jersey-sample-application/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=building-restful-services-with-java-using-jax-rs-and-jersey-sample-application</link>
		<comments>http://coenraets.org/blog/2011/11/building-restful-services-with-java-using-jax-rs-and-jersey-sample-application/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 16:32:57 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JAX-RS]]></category>
		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=2019</guid>
		<description><![CDATA[I&#8217;m working on a project that required a RESTful API implemented in Java. Jersey, the reference implementation for JAX-RS, made it easy to implement and deploy these services. I figured I’d share my sample application here. Configuring Tomcat (or your own app server) There are many options to initialize Jersey in your servlet container. Some [...]
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Building RESTful Services with Java Using JAX-RS and Jersey &#8212; Sample Application http://coenraets.org/blog/?p=2019" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2011%2F11%2Fbuilding-restful-services-with-java-using-jax-rs-and-jersey-sample-application%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a project that required a RESTful API implemented in Java. <a href="http://jersey.java.net/">Jersey</a>, the reference implementation for JAX-RS, made it easy to implement and deploy these services. I figured I’d share my sample application here.<br />
<span id="more-2019"></span></p>
<h4>Configuring Tomcat (or your own app server)</h4>
<p>There are many options to initialize Jersey in your servlet container. Some of them require no XML configuration at all. For my application, I simply configured the Jersey Servlet in web.xml as follows:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;servlet&gt;
	&lt;servlet-name&gt;Jersey&lt;/servlet-name&gt;
	&lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;/servlet-class&gt;
	&lt;init-param&gt;
		&lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt;
		&lt;param-value&gt;org.coenraets&lt;/param-value&gt;
	&lt;/init-param&gt;
	&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
&lt;/servlet&gt;

&lt;servlet-mapping&gt;
	&lt;servlet-name&gt;Jersey&lt;/servlet-name&gt;
	&lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;
</pre>
<p>NOTE: Using this type of initialization, the packages parameter defines which classes Jersey will scan for URL Paths to resolve: in this case, all the classes in org.coenraets.* packages.</p>
<h4>Defining the REST API</h4>
<p>Before working on the implementation, I identified that my simple application would require three services:</p>
<ol>
<li>Find all employees</li>
<li>Find an employee by id</li>
<li>Find a list of direct reports for a specific employee</li>
</ol>
<p>Based on these requirements, I came up with the following REST API:</p>
<ol>
<li>
<strong>/api/employees</strong><br/>Returns all employees
</li>
<li>
<strong>/api/employees/1</strong><br/>Returns an employee identified by id (employee 1 in this case)
</li>
<li>
<strong>/api/employees/1/reports</strong><br/>Returns direct reports of an employee (employee 1 in this case)
</li>
</ol>
<h4>Implementing the API</h4>
<p>Once my API was defined, providing the implementation using JAX-RS was easy. I just created a Java class defined as follows:</p>
<pre class="brush: java; title: ; notranslate">
package org.coenraets.directory;

import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

@Path(&quot;/employees&quot;)
public class EmployeeResource {

	EmployeeDAO dao = new EmployeeDAO();

	@GET
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public List&lt;Employee&gt; findAll() {
		return dao.findAll();
	}

	@GET @Path(&quot;{id}&quot;)
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public Employee findById(@PathParam(&quot;id&quot;) String id) {
		return dao.findById(Integer.parseInt(id));
	}

	@GET @Path(&quot;{id}/reports&quot;)
	@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
	public List&lt;Employee&gt; findByManager(@PathParam(&quot;id&quot;) String managerId) {
		return dao.findByManager(Integer.parseInt(managerId));
	}
}
</pre>
<p>You annotate your class and methods with the path (@Path) and the content type (@Produces) they respond to. The  serialization from model objects to the content type requested by the client happens automatically. In this application, the methods will return either JSON or XML depending on the content type requested by the client.</p>
<p>The approach you use to actually retrieve the data is, of course, totally up to you. In this example, I use a simple DAO, but you can of course use your own data access solution.</p>
<p>This application only required GET methods, but JAX-RS allows you to handle the other HTTP methods (@GET, @PUT, @POST, @DELETE and @HEAD).</p>
<p>Note that the package name matches the packages parameter defined in web.xml.</p>
<h4>Testing the API</h4>
<p>If you want to test your API before using it in a client application, you can invoke your REST services straight from a browser address bar.  For example, try:</p>
<p><a href="http://coenraets.org/rest/employees">http://coenraets.org/rest/employees</a><br />
<a href="http://coenraets.org/rest/employees/1">http://coenraets.org/rest/employees//1</a><br />
<a href="http://coenraets.org/rest/employees/1/reports">http://coenraets.org/rest/employees/1/reports</a></p>
<p>However, that doesn’t give you full control to test all the content types your API can return. A common option to test the different content types supported by your API is to use <a href="http://curl.haxx.se/">cURL</a> and specify the content type requested in the Accept header:</p>
<p>curl -I http://coenraets.org/rest/employees -H&#8217;Accept:application/json&#8217;</p>
<h4>Download the Source Code</h4>
<p>Click <a href="http://coenraets.org/apps/directory/EmployeeDirectoryJAXRS.zip">here</a> to download the source code (Eclipse Dynamic Web Project).</p>
<p>In my next post, I&#8217;ll share the client-side of the application: how to invoke these services using jQuery (and JSON).</p>
<p>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"  data-lang="en"  data-url="http://coenraets.org/blog/2011/11/building-restful-services-with-java-using-jax-rs-and-jersey-sample-application/"></a>
<!-- End WP Socializer Plugin - Retweet Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - +1 Button -->
<g:plusone size="medium" href="http://coenraets.org/blog/2011/11/building-restful-services-with-java-using-jax-rs-and-jersey-sample-application/" ></g:plusone>
<!-- End WP Socializer Plugin - +1 Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Facebook Button -->
<iframe src="http://www.facebook.com/plugins/like.php?&amp;href=http://coenraets.org/blog/2011/11/building-restful-services-with-java-using-jax-rs-and-jersey-sample-application/&amp;layout=button_count&amp;show_faces=0&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>
<!-- End WP Socializer Plugin - Facebook Button -->
</span>
</p>
<p>
<a href="https://twitter.com/ccoenraets" class="twitter-follow-button" data-show-count="false" data-lang="en" data-size="large">Follow @ccoenraets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Building RESTful Services with Java Using JAX-RS and Jersey &#8212; Sample Application http://coenraets.org/blog/?p=2019" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2011%2F11%2Fbuilding-restful-services-with-java-using-jax-rs-and-jersey-sample-application%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2011/11/building-restful-services-with-java-using-jax-rs-and-jersey-sample-application/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flex / Spring Mobile Test Drive: Learn the Best Way to Build Java-Backed iOS, Android and PlayBook Apps</title>
		<link>http://coenraets.org/blog/2011/08/flex-spring-mobile-test-drive-learn-the-best-way-to-build-java-backed-ios-android-and-playbook-apps/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flex-spring-mobile-test-drive-learn-the-best-way-to-build-java-backed-ios-android-and-playbook-apps</link>
		<comments>http://coenraets.org/blog/2011/08/flex-spring-mobile-test-drive-learn-the-best-way-to-build-java-backed-ios-android-and-playbook-apps/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 13:50:13 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[PlayBook]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=1700</guid>
		<description><![CDATA[Flex is a powerful application framework for building first-class mobile applications for iOS, Android, and the BlackBerry PlayBook using a single programming model, a single tool, and a single code base. If you are a Java developer, the Flex programming model is also easy to master because it is syntactically very close to Java. The [...]
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Flex / Spring Mobile Test Drive: Learn the Best Way to Build Java-Backed iOS, Android and PlayBook Apps http://coenraets.org/blog/?p=1700" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2011%2F08%2Fflex-spring-mobile-test-drive-learn-the-best-way-to-build-java-backed-ios-android-and-playbook-apps%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></description>
			<content:encoded><![CDATA[<p><a href="http://coenraets.org/blog/wp-content/uploads/2011/08/flex-spring-mobile1.jpg"><img src="http://coenraets.org/blog/wp-content/uploads/2011/08/flex-spring-mobile1.jpg" alt="" title="flex-spring-mobile" width="650" height="250" class="alignnone size-full wp-image-1724" /></a></p>
<p>Flex is a powerful application framework for building first-class mobile applications for iOS, Android, and the BlackBerry PlayBook using a single programming model, a single tool, and a single code base.</p>
<p>If you are a Java developer, the Flex programming model is also easy to master because it is syntactically very close to Java. The Flex IDE (Flash Builder) is a plugin on top of Eclipse, which means that you can write, debug, and profile your client and server code in the same development environment.</p>
<p>You can also easily integrate Flex applications with a Java back end using the Remoting and Messaging services provided by <a href="http://opensource.adobe.com/wiki/display/blazeds/BlazeDS">BlazeDS</a> (open source) or <a href="http://www.adobe.com/products/livecycle/dataservices/">LCDS</a> (commercial license). For Spring developers, the integration is even easier and more powerful using the <a href="http://www.springsource.org/spring-flex">Spring/BlazeDS integration project</a>, which makes the Flex and Spring combination the best way to build cross-platform iOS, Android, and PlayBook applications with a Java back end.<br />
<span id="more-1700"></span><br />
I put together a new &#8220;Flex / Spring Mobile Test Drive” to help developers get started building these applications. The Test Drive consists of a web application with BlazeDS and the “Spring/BlazeDS integration” preconfigured and ready to use. It also includes two sample mobile applications running “out-of-the-box”: An Employee Directory and a Trader Desktop. The Employee directory demonstrates how to use Remoting to access Spring services. The Mobile Trader focuses on the Messaging integration: It shows a Spring component pushing real-time market data updates to a Flex applications.</p>
<p><img src="http://coenraets.org/blog/wp-content/uploads/2011/08/github1.gif" alt="" title="github" width="56" height="49" /></a>The project is hosted on GitHub: <a href="https://github.com/ccoenraets/flex-spring-mobile-testdrive">https://github.com/ccoenraets/flex-spring-mobile-testdrive</a></p>
<h3>Installation</h3>
<ol>
<li>Deploy flex-spring-mobile.war to your app server.</li>
<li>Import the projects into Flash Builder: (If you don&#8217;t have Flash Builder, you can download it <a href="http://www.adobe.com/cfusion/tdrc/index.cfm?product=flash_builder">here</a>)
<ul>
<li>File > Import > General > Existing Projects into Workspace</li>
<li>Select ccoenraets-flex-spring-mobile-testdrive as the Root directory</li>
<li>Select all the projects (EmployeeDirectoryJ, flex-spring-mobile, and MobileTraderJ)</li>
<li>Click Finish</li>
</ul>
</li>
<li>Running the EmployeeDirectory
<ul>
<li>Open config.xml in the src folder and modify the endpoint to match the hostname and port number of your app server</li>
<li>Right-click EmployeeDirectoryJ and select Run As > Mobile Application</li>
<li>Select a target platform (iOS, Android, or BlackBerry Tablet OS), select On desktop as the launch method and select a device to simulate</li>
<li>Click Run</li>
</ul>
</li>
<li>Running the MobileTrader Application
<ul>
<li>Right-click MobileTraderJ and select Run As > Mobile Application
<li>Select a target platform (iOS, Android, or BlackBerry Tablet OS), select On desktop as the launch method and select a device to simulate
<li>Click Run
<li>The Settings view is automatically activated the first time you run the application. Enter the MessageBroker base URL, for example: http://localhost:8080/flex-spring-mobile/messagebroker (modify the endpoint to match the hostname and port number of your app server), select a Channel type, click Save Settings, and click Start Server Feed.
<li>Access the Watch tab: The list should be automatically updated with the (simulated) real time updates pushed from the Spring web app.
</ul>
</ol>
<p>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"  data-lang="en"  data-url="http://coenraets.org/blog/2011/08/flex-spring-mobile-test-drive-learn-the-best-way-to-build-java-backed-ios-android-and-playbook-apps/"></a>
<!-- End WP Socializer Plugin - Retweet Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - +1 Button -->
<g:plusone size="medium" href="http://coenraets.org/blog/2011/08/flex-spring-mobile-test-drive-learn-the-best-way-to-build-java-backed-ios-android-and-playbook-apps/" ></g:plusone>
<!-- End WP Socializer Plugin - +1 Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Facebook Button -->
<iframe src="http://www.facebook.com/plugins/like.php?&amp;href=http://coenraets.org/blog/2011/08/flex-spring-mobile-test-drive-learn-the-best-way-to-build-java-backed-ios-android-and-playbook-apps/&amp;layout=button_count&amp;show_faces=0&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>
<!-- End WP Socializer Plugin - Facebook Button -->
</span>
</p>
<p>
<a href="https://twitter.com/ccoenraets" class="twitter-follow-button" data-show-count="false" data-lang="en" data-size="large">Follow @ccoenraets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Flex / Spring Mobile Test Drive: Learn the Best Way to Build Java-Backed iOS, Android and PlayBook Apps http://coenraets.org/blog/?p=1700" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2011%2F08%2Fflex-spring-mobile-test-drive-learn-the-best-way-to-build-java-backed-ios-android-and-playbook-apps%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2011/08/flex-spring-mobile-test-drive-learn-the-best-way-to-build-java-backed-ios-android-and-playbook-apps/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Flex 4 Sample Application using a Java Back-End, BlazeDS 4 and Flash Builder 4 Data Wizards</title>
		<link>http://coenraets.org/blog/2010/03/flex-4-sample-application-using-a-java-back-end-blazeds-4-and-flash-builder-4-data-wizards/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=flex-4-sample-application-using-a-java-back-end-blazeds-4-and-flash-builder-4-data-wizards</link>
		<comments>http://coenraets.org/blog/2010/03/flex-4-sample-application-using-a-java-back-end-blazeds-4-and-flash-builder-4-data-wizards/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 12:11:35 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex4]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=530</guid>
		<description><![CDATA[I put together a new Test Drive environment to allow you to explore the development of Flex 4 applications with a Java back-end using the new &#8220;Data-Centric Development&#8221; features of Flash Builder 4. These features include service introspection, value object and service stub generation, etc. This Test Drive is still work in progress: it currently [...]
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Flex 4 Sample Application using a Java Back-End, BlazeDS 4 and Flash Builder 4 Data Wizards http://coenraets.org/blog/?p=530" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2010%2F03%2Fflex-4-sample-application-using-a-java-back-end-blazeds-4-and-flash-builder-4-data-wizards%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></description>
			<content:encoded><![CDATA[<p>I put together a new Test Drive environment to allow you to explore the development of Flex 4 applications with a Java back-end using the new &#8220;Data-Centric Development&#8221; features of Flash Builder 4. These features include service introspection, value object and service stub generation, etc. This Test Drive is still work in progress: it currently consists of a single application called InSync (a complete Flex 4 rewrite of my contact management sample application), but I think it&#8217;s already valuable to understand the impact of the new Flash Builder 4 data features. Insync also demonstrates some of the new features of Flex 4: skinning, skinnable components, layout managers, etc.</p>
<p>Watch the video below to get familiar with the Test Drive environment and the sample application:</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/ylm6GcMjU1w&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ylm6GcMjU1w&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<h2>Installation Instructions</h2>
<ol>
<li>Download <a href="http://coenraets.org/downloads/flex-java-testdrive/flex-java-testdrive.zip">flex-java-testdrive.zip</a>, and unzip the file in your root directory.</li>
<li>Open a Command Window or Shell, navigate to /flex-java-testdrive/tomcat/bin, and start Tomcat (for instance: catalina run).</li>
<li>Open a browser and access http://localhost:8400/testdrive/InSync/InSync.html.</li>
</ol>
<h2>Importing the projects in Flash Builder 4</h2>
<ol>
<li>In Flash Builder 4, click <strong>File > Import > General > Existing Projects into Workspace</strong>.</li>
<li>Specify <strong>flex-java-testdrive/projects</strong> as the root directory and click finish.</li>
<li>Explore the projects: InSync is the Flex project and java-testdrive is the Java project for the server-side classes.</li>
</ol>
<p>In the InSync project, the classes in the services and valueObjects packages have been generated automatically by Flash Builder 4. My next blog post will show you how to generate these classes based on existing Java services deployed in BlazeDS.</p>
<p>NOTE: Because BlazeDS 4 hasn’t yet been released, this version of the Test Drive uses a nightly build of BlazeDS 4.</p>
<p>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"  data-lang="en"  data-url="http://coenraets.org/blog/2010/03/flex-4-sample-application-using-a-java-back-end-blazeds-4-and-flash-builder-4-data-wizards/"></a>
<!-- End WP Socializer Plugin - Retweet Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - +1 Button -->
<g:plusone size="medium" href="http://coenraets.org/blog/2010/03/flex-4-sample-application-using-a-java-back-end-blazeds-4-and-flash-builder-4-data-wizards/" ></g:plusone>
<!-- End WP Socializer Plugin - +1 Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Facebook Button -->
<iframe src="http://www.facebook.com/plugins/like.php?&amp;href=http://coenraets.org/blog/2010/03/flex-4-sample-application-using-a-java-back-end-blazeds-4-and-flash-builder-4-data-wizards/&amp;layout=button_count&amp;show_faces=0&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>
<!-- End WP Socializer Plugin - Facebook Button -->
</span>
</p>
<p>
<a href="https://twitter.com/ccoenraets" class="twitter-follow-button" data-show-count="false" data-lang="en" data-size="large">Follow @ccoenraets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Flex 4 Sample Application using a Java Back-End, BlazeDS 4 and Flash Builder 4 Data Wizards http://coenraets.org/blog/?p=530" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2010%2F03%2Fflex-4-sample-application-using-a-java-back-end-blazeds-4-and-flash-builder-4-data-wizards%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2010/03/flex-4-sample-application-using-a-java-back-end-blazeds-4-and-flash-builder-4-data-wizards/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Building the Server-Side of the &quot;Tour de Flex&quot; Real-Time Dashboard</title>
		<link>http://coenraets.org/blog/2009/05/tdfdashboard/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tdfdashboard</link>
		<comments>http://coenraets.org/blog/2009/05/tdfdashboard/#comments</comments>
		<pubDate>Tue, 26 May 2009 15:18:30 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[LCDS]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=121</guid>
		<description><![CDATA[Greg Wilson and Damien Mandrioli are also blogging about the new Tour de Flex real time dashboard today. Greg is the inspiration behind everything “Tour de Flex”, including the idea of the dashboard. He has the story behind the genesis of this project on his blog. Damien (from IBM/ILOG) did a fantastic job at building [...]
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Building the Server-Side of the &quot;Tour de Flex&quot; Real-Time Dashboard http://coenraets.org/blog/?p=121" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2009%2F05%2Ftdfdashboard%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></description>
			<content:encoded><![CDATA[<p><img src="http://coenraets.org/downloads/tdfdashboard.png" alt="" /></p>
<p><a href="http://gregsramblings.com/">Greg Wilson</a> and <a href="http://blogs.ilog.com/elixir/author/dmandrioli/">Damien Mandrioli</a> are also blogging about the new Tour de Flex real time dashboard today. Greg is the inspiration behind everything “Tour de Flex”, including the idea of the dashboard. He has the story behind the genesis of this project <a href="http://gregsramblings.com/2009/05/26/tour-de-flex-live-planetary-dashboard">on his blog</a>. Damien (from IBM/ILOG) did a fantastic job at building the client-side of the dashboard using the very cool <a href="http://www.ilog.com/products/ilogelixir/">ILOG Elixir components</a>, and he <a href="http://blogs.ilog.com/elixir/2009/05/26/tdfdashboard/">walks you through the details</a> on his blog.</p>
<p>My contribution to the project is the &#8220;real-time messaging&#8221; infrastructure. I provide the details below.</p>
<p>First the overall workflow&#8230;</p>
<p><img src="http://coenraets.org/downloads/tdfdashboardflow.png" alt="" /></p>
<p>The reason we are combining PHP and Java in this workflow is mostly historical. In the initial version of Tour de Flex, there was no Java involved: Greg was persisting loaded samples data (sample id and timestamp) directly from his PHP page. We later added LiveCycle Data Services to the picture to support the data push requirement of the dashboard, and we took the opportunity to move some code (such as the database persistence) from PHP to Java. Note that we are using LCDS for the performance and scalability of its high-end channels, but the application could also be deployed on BlazeDS.</p>
<p>A more straightforward architecture would be for the client to communicate directly with LCDS. For example, the client could invoke a remote object that would directly publish the loaded sample data (sample id and geolocation of the client) to the message destination. Alternatively, the client could use a Producer object to directly publish the message to the destination. Because some logic (such as geolocating the IP address and persisting the data) has to be executed at the server-side before routing the messages to the subscribed clients, you would have to write a custom message adapter if you used this approach.</p>
<p>We will probably streamline the workflow with one of these two approaches in the future, but in the meantime here is the source code for the servlet (logging and non-essential code removed for brevity):</p>
<pre class="brush: java; title: ; notranslate">
package com.adobe.tdf;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.maxmind.geoip.Location;
import com.maxmind.geoip.LookupService;

import flex.messaging.MessageBroker;
import flex.messaging.messages.AsyncMessage;
import flex.messaging.util.UUIDUtils;

public class TDFServlet extends HttpServlet {

	// Unique clientID for the message service
	private String clientID = UUIDUtils.createUUID();

	// The geocoding service
	protected LookupService lookupService;

	// A DAO to store sample requests in a database
	protected SampleRequestDAO dao = new SampleRequestDAO();

	// The LCDS message broker
	protected MessageBroker messageBroker;

	// The LCDS messaging destination where real time sample requests information is pushed
	protected String destination;

	public void init() throws ServletException {

		ServletConfig config = getServletConfig();
		destination = config.getInitParameter(&quot;messaging.destination.name&quot;);
		String path = config.getInitParameter(&quot;geocoding.database.path&quot;);
		try {
			// Load the geocoding database in init() to make sure we load it only once
			lookupService = new LookupService(path, LookupService.GEOIP_MEMORY_CACHE);
		} catch (IOException e) {
			// We swallow the exception here. If the database is not available, the feed
			// will still work but won't provide the location info.
		}
	}

	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		if (messageBroker == null)
		{
			messageBroker = MessageBroker.getMessageBroker(null);
		}

		SampleRequest sampleRequest = new SampleRequest();

		try {
			sampleRequest.setSampleId(Integer.parseInt(request.getParameter(&quot;sampleId&quot;)));
		} catch (Exception e) {
			String message = &quot;A valid sampleId is required to process this request&quot;;
			throw new RuntimeException(message);
		}

		sampleRequest.setTimestamp(new Date());

		String ipAddress = request.getParameter(&quot;ipAddress&quot;);

		// Geolocate the IP address and add the info to the message
		if (lookupService != null &amp;&amp; ipAddress != null)
		{
	                Location location = lookupService.getLocation(ipAddress);
			if (location != null)
			{
				sampleRequest.setLatitude(location.latitude);
				sampleRequest.setLongitude(location.longitude);
				sampleRequest.setCountry(location.countryCode);
				sampleRequest.setCity(location.city);
			}
		}

		try {
			dao.create(sampleRequest, ipAddress);
		} catch (RuntimeException e) {

		}

		String subtopic = request.getParameter(&quot;subtopic&quot;);
		if (subtopic == null) subtopic = &quot;flex&quot;;

		// Publish the message to specified destination and subtopic.
		AsyncMessage msg = new AsyncMessage();
		msg.setDestination(destination);
		msg.setHeader(&quot;DSSubtopic&quot;, subtopic);
		msg.setClientId(clientID);
		msg.setMessageId(UUIDUtils.createUUID());
		msg.setTimestamp(System.currentTimeMillis());
		msg.setBody(sampleRequest);
		messageBroker.routeMessageToService(msg, null);

		PrintWriter out = response.getWriter();
	        out.println(&quot;&lt;html&gt;&lt;body&gt;ok&lt;/body&gt;&lt;/html&gt;&quot;);

	}

}
</pre>
<p>The servlet is responsible for three things:</p>
<ol>
<li>Geolocate the IP address of the client requesting the sample. We currently use the MaxMind Geolocation API. The API is straightforward and the results seem pretty accurate.</li>
<li>Save the information about the loaded sample in a database. We keep track of historical data to be able to support future data visualization projects.</li>
<li>Publish the data about the loaded sample to a message destination. The servlet uses the Message Service Java API to directly push messages to the Flex destination (lines 97 to 104). Note that the same API exists for ColdFusion, so CF developers could use a CF page instead of this servlet to push messages to the client.</li>
</ol>
<h3>Channels</h3>
<p>The messaging destination is set up to support different communication channels: RTMP, long polling, and regular polling. The client-side developer can decide which channel to use to communicate with the server. For example, if you wanted to use RTMP as the primary channel, fall back to long polling if the RTMP connection fails, and fall back to regular polling if the long polling connection fails you could set up your client-side ChannelSet as follows:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;mx:ChannelSet id=&quot;channelSet&quot;&gt;
	&lt;mx:RTMPChannel id=&quot;rtmp&quot; url=&quot;rtmp://hostname:2037&quot;/&gt;
	&lt;mx:AMFChannel url=&quot;http://hostname/context/messagebroker/amflongpolling&quot;/&gt;
	&lt;mx:AMFChannel url=&quot;http://hostname/context/messagebroker/amfpolling&quot;/&gt;
&lt;/mx:ChannelSet&gt;
</pre>
<p>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"  data-lang="en"  data-url="http://coenraets.org/blog/2009/05/tdfdashboard/"></a>
<!-- End WP Socializer Plugin - Retweet Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - +1 Button -->
<g:plusone size="medium" href="http://coenraets.org/blog/2009/05/tdfdashboard/" ></g:plusone>
<!-- End WP Socializer Plugin - +1 Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Facebook Button -->
<iframe src="http://www.facebook.com/plugins/like.php?&amp;href=http://coenraets.org/blog/2009/05/tdfdashboard/&amp;layout=button_count&amp;show_faces=0&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>
<!-- End WP Socializer Plugin - Facebook Button -->
</span>
</p>
<p>
<a href="https://twitter.com/ccoenraets" class="twitter-follow-button" data-show-count="false" data-lang="en" data-size="large">Follow @ccoenraets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Building the Server-Side of the &quot;Tour de Flex&quot; Real-Time Dashboard http://coenraets.org/blog/?p=121" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2009%2F05%2Ftdfdashboard%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2009/05/tdfdashboard/feed/</wfw:commentRss>
		<slash:comments>66</slash:comments>
		</item>
		<item>
		<title>New Update to the Spring BlazeDS Integration Test Drive</title>
		<link>http://coenraets.org/blog/2009/05/new-update-to-the-spring-blazeds-integration-test-drive/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-update-to-the-spring-blazeds-integration-test-drive</link>
		<comments>http://coenraets.org/blog/2009/05/new-update-to-the-spring-blazeds-integration-test-drive/#comments</comments>
		<pubDate>Tue, 12 May 2009 19:33:32 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=119</guid>
		<description><![CDATA[I made some additional changes to the Spring BlazeDS Integration (RC1) Test Drive: The Test Drive now includes an annotation-based configuration sample (the Company Manager sample). Spring annotations such as @Service, @RemotingDestination, @Autowired, @RemotingInclude, and @RemotingExclude make it really easy to configure your beans and make them available through Remoting. As an example, here is [...]
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ New Update to the Spring BlazeDS Integration Test Drive http://coenraets.org/blog/?p=119" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2009%2F05%2Fnew-update-to-the-spring-blazeds-integration-test-drive%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></description>
			<content:encoded><![CDATA[<p>I made some additional changes to the Spring BlazeDS Integration (RC1) Test Drive:</p>
<ul>
<li>The Test Drive now includes an annotation-based configuration sample (the Company Manager sample). Spring annotations such as @Service, @RemotingDestination, @Autowired, @RemotingInclude, and @RemotingExclude make it really easy to configure your beans and make them available through Remoting. As an example, here is the source code for the CompanyDAO class:
<p></p>
<pre class="brush: java; title: ; notranslate">
package flex.spring.samples.company;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.sql.DataSource;

import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.flex.remoting.RemotingExclude;
import org.springframework.flex.remoting.RemotingInclude;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcInsert;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;

import flex.spring.samples.industry.IIndustryDAO;

@Service(&quot;companyService&quot;)
@RemotingDestination(channels={&quot;my-amf&quot;})
public class CompanyDAO implements ICompanyDAO {

	private final SimpleJdbcTemplate template;
	private final SimpleJdbcInsert insertCompany;

	private IIndustryDAO industryDAO;

	private final ParameterizedRowMapper&lt;Company&gt; rowMapper = new ParameterizedRowMapper&lt;Company&gt;(){
		public Company mapRow(ResultSet rs, int rowNum) throws SQLException {
			Company company = new Company();
			company.setId(rs.getInt(&quot;id&quot;));
			company.setName(rs.getString(&quot;name&quot;));
			company.setAddress(rs.getString(&quot;address&quot;));
			company.setCity(rs.getString(&quot;city&quot;));
			company.setState(rs.getString(&quot;state&quot;));
			company.setZip(rs.getString(&quot;zip&quot;));
			company.setPhone(rs.getString(&quot;phone&quot;));
			company.setIndustry(industryDAO.findById(rs.getInt(&quot;industry_id&quot;)));
			return company;
		}
	};

	@Autowired
	public CompanyDAO(DataSource dataSource, IIndustryDAO industryDAO) {
		template = new SimpleJdbcTemplate(dataSource);
		insertCompany = new SimpleJdbcInsert(dataSource).withTableName(&quot;COMPANY&quot;).usingGeneratedKeyColumns(&quot;ID&quot;);
		this.industryDAO = industryDAO;
	}

	@RemotingInclude
	public Company findById(int id) {
		return template.queryForObject(&quot;SELECT * FROM company WHERE id=?&quot;, rowMapper, id);
	}

	@RemotingInclude
	public List&lt;Company&gt; findAll() {
		return template.query(&quot;SELECT * FROM company ORDER BY name&quot;, rowMapper);
	}

	@RemotingInclude
	public List&lt;Company&gt; findByName(String name) {
		return template.query(&quot;SELECT * FROM company WHERE UPPER(name) LIKE ? ORDER BY name&quot;,
				rowMapper,
				&quot;%&quot; + name.toUpperCase() + &quot;%&quot;);
	}

	@RemotingInclude
	public Company create(Company company) {
		Map&lt;String, Object&gt; parameters = new HashMap&lt;String, Object&gt;();
        parameters.put(&quot;name&quot;, company.getName());
        parameters.put(&quot;address&quot;, company.getAddress());
        parameters.put(&quot;city&quot;, company.getCity());
        parameters.put(&quot;state&quot;, company.getState());
        parameters.put(&quot;zip&quot;, company.getZip());
        parameters.put(&quot;phone&quot;, company.getPhone());
        parameters.put(&quot;industry_id&quot;, company.getIndustry().getId());
        Number id = insertCompany.executeAndReturnKey(parameters);
		company.setId(id.intValue());
		return company;
	}

	@RemotingInclude
	public boolean update(Company company) {
        int count = template.update(&quot;UPDATE company SET name=?, address=?, city=?, state=?, zip=?, phone=?, industry_id=? WHERE id=?&quot;,
				company.getName(),
				company.getAddress(),
				company.getCity(),
				company.getState(),
				company.getZip(),
				company.getPhone(),
				company.getIndustry().getId(),
				company.getId());
		return (count == 1);
	}

	@RemotingExclude
	public boolean remove(Company company) {
		int count = template.update(&quot;DELETE FROM company WHERE id=?&quot;, company.getId());
		return (count == 1);
	}

}
</pre>
<p>
</li>
<li>The Test Drive is now using the M3 build of Spring 3 (as opposed to M2 in the previous builds of the Test Drive).</li>
<li>I modified the configuration of the long polling channel to support more persistent connections per domain based on the browser capabilities.</li>
<li>And of course compared to the M2 build, this version of the Test Drive includes a number of Messaging samples.
<p>Using the Messaging integration, setting up a destination can be as easy as:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;flex:message-destination id=&quot;chat&quot; /&gt;
</pre>
<p>And here is how you configure a destination mapped to a JMS topic:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;flex:jms-message-destination id=&quot;jms-chat&quot; jms-destination=&quot;chatTopic&quot; /&gt;
</pre>
</li>
</ul>
<h3>Installation Instructions:</h3>
<ol>
<li>Download the Spring / Flex TestDrive here: <a href="http://coenraets.org/downloads/spring-flex-testdrive-RC1v2.zip">http://coenraets.org/downloads/spring-flex-testdrive-RC1v2.zip</a></li>
<li>Unzip it in your root directory</li>
<li>Navigate to /spring-flex-testdrive/tomcat/bin and start Tomcat (for instance: catalina run)</li>
<li>Open a browser and access http://localhost:8080</li>
<li>Follow the instructions</li>
</ol>
<p></p>
<p>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"  data-lang="en"  data-url="http://coenraets.org/blog/2009/05/new-update-to-the-spring-blazeds-integration-test-drive/"></a>
<!-- End WP Socializer Plugin - Retweet Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - +1 Button -->
<g:plusone size="medium" href="http://coenraets.org/blog/2009/05/new-update-to-the-spring-blazeds-integration-test-drive/" ></g:plusone>
<!-- End WP Socializer Plugin - +1 Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Facebook Button -->
<iframe src="http://www.facebook.com/plugins/like.php?&amp;href=http://coenraets.org/blog/2009/05/new-update-to-the-spring-blazeds-integration-test-drive/&amp;layout=button_count&amp;show_faces=0&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>
<!-- End WP Socializer Plugin - Facebook Button -->
</span>
</p>
<p>
<a href="https://twitter.com/ccoenraets" class="twitter-follow-button" data-show-count="false" data-lang="en" data-size="large">Follow @ccoenraets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ New Update to the Spring BlazeDS Integration Test Drive http://coenraets.org/blog/?p=119" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2009%2F05%2Fnew-update-to-the-spring-blazeds-integration-test-drive%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2009/05/new-update-to-the-spring-blazeds-integration-test-drive/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Speaking at the New England Java User Group on Thursday (May 14th)</title>
		<link>http://coenraets.org/blog/2009/05/speaking-at-the-new-england-java-user-group-on-thursday-may-14th/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=speaking-at-the-new-england-java-user-group-on-thursday-may-14th</link>
		<comments>http://coenraets.org/blog/2009/05/speaking-at-the-new-england-java-user-group-on-thursday-may-14th/#comments</comments>
		<pubDate>Mon, 11 May 2009 18:47:18 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=118</guid>
		<description><![CDATA[Follow @ccoenraets
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Speaking at the New England Java User Group on Thursday (May 14th) http://coenraets.org/blog/?p=118" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2009%2F05%2Fspeaking-at-the-new-england-java-user-group-on-thursday-may-14th%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></description>
			<content:encoded><![CDATA[<p><img src="http://coenraets.org/downloads/nejug.gif" alt="" </p>
<p>I will be joined by Mark Fisher from SpringSource and we will talk about Flex, Spring, BlazeDS and the integration of these technologies. <a href="http://www.springsource.org/spring-flex">Spring BlazeDS integration</a> RC1 was released last week. One of the key features in RC1 is the integration of the Message service, and Mark is the lead developer on that feature.</p>
<p>I hope to see you there if you live in the greater Boston area.</p>
<p>Thu, May 14 6:00pm<br />
Sun Microsystems &#8211; 1 Network Way, Burlington, MA<br />
<a href="http://www.nejug.org/events/show/93">NEJUG Link</a></p>
<p>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"  data-lang="en"  data-url="http://coenraets.org/blog/2009/05/speaking-at-the-new-england-java-user-group-on-thursday-may-14th/"></a>
<!-- End WP Socializer Plugin - Retweet Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - +1 Button -->
<g:plusone size="medium" href="http://coenraets.org/blog/2009/05/speaking-at-the-new-england-java-user-group-on-thursday-may-14th/" ></g:plusone>
<!-- End WP Socializer Plugin - +1 Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Facebook Button -->
<iframe src="http://www.facebook.com/plugins/like.php?&amp;href=http://coenraets.org/blog/2009/05/speaking-at-the-new-england-java-user-group-on-thursday-may-14th/&amp;layout=button_count&amp;show_faces=0&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>
<!-- End WP Socializer Plugin - Facebook Button -->
</span>
</p>
<p>
<a href="https://twitter.com/ccoenraets" class="twitter-follow-button" data-show-count="false" data-lang="en" data-size="large">Follow @ccoenraets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ Speaking at the New England Java User Group on Thursday (May 14th) http://coenraets.org/blog/?p=118" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2009%2F05%2Fspeaking-at-the-new-england-java-user-group-on-thursday-may-14th%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2009/05/speaking-at-the-new-england-java-user-group-on-thursday-may-14th/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>New Test Drive for Spring BlazeDS Integration RC1</title>
		<link>http://coenraets.org/blog/2009/05/new-test-drive-for-spring-blazeds-integration-rc1/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-test-drive-for-spring-blazeds-integration-rc1</link>
		<comments>http://coenraets.org/blog/2009/05/new-test-drive-for-spring-blazeds-integration-rc1/#comments</comments>
		<pubDate>Fri, 08 May 2009 20:34:55 +0000</pubDate>
		<dc:creator>Christophe</dc:creator>
				<category><![CDATA[BlazeDS]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[LCDS]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://coenraets.org/blog/?p=117</guid>
		<description><![CDATA[UPDATE: An updated version of this Test Drive is available here SpringSource just released the RC1 build for the Spring / BlazeDS integration project. The key new feature in RC1 is the integration of the BlazeDS Message Service. I updated my Spring BlazeDS Integration Test Drive to showcase the messaging integration. In addition to Remoting [...]
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ New Test Drive for Spring BlazeDS Integration RC1 http://coenraets.org/blog/?p=117" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2009%2F05%2Fnew-test-drive-for-spring-blazeds-integration-rc1%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE: An updated version of this Test Drive is available <a href="http://coenraets.org/blog/2009/05/new-update-to-the-spring-blazeds-integration-test-drive/">here</a></strong></p>
<p>SpringSource just released the RC1 build for the <a href="http://www.springsource.org/spring-flex">Spring / BlazeDS integration project</a>. The key new feature in RC1 is the integration of the BlazeDS Message Service.</p>
<p>I updated my Spring BlazeDS Integration Test Drive to showcase the messaging integration.</p>
<p>In addition to Remoting and Security samples, the Test Drive now includes the following Messaging samples:</p>
<ul>
<li><strong>Chat</strong>: Messaging basics</li>
<li><strong>Simple Data Push</strong>: A simple data push example</li>
<li><strong>Traderdesktop</strong>: A more sophisticated data push example showing how to use subtopics</li>
<li><strong>JMS Chat</strong>: A chat application using a JMS topic and exchanging messages with a Swing-based client</li>
<li><strong>Collaboration</strong>: An example showing how to use messaging to remotely drive another client&#8217;s application</li>
</ul>
<h3>Installation Instructions:</h3>
<ol>
<li>Download the Spring / Flex TestDrive here: <a href="http://coenraets.org/downloads/spring-flex-testdrive-RC1.zip">http://coenraets.org/downloads/spring-flex-testdrive-RC1.zip</a></li>
<li>Unzip it in your root directory</li>
<li>Navigate to /spring-flex-testdrive/tomcat/bin and start Tomcat (for instance: catalina run)</li>
<li>Open a browser and access http://localhost:8080</li>
<li>Follow the instructions</li>
</ol>
<p>As always, I&#8217;d love to hear your feedback and your ideas to improve this Test Drive.</p>
<p>I will probably have another version next week with a couple of additional samples and more documentation for the Message Service, but I already wanted to make this version available to allow you to experiment RC1 samples.</p>
<p>Christophe</p>
<p>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal"  data-lang="en"  data-url="http://coenraets.org/blog/2009/05/new-test-drive-for-spring-blazeds-integration-rc1/"></a>
<!-- End WP Socializer Plugin - Retweet Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - +1 Button -->
<g:plusone size="medium" href="http://coenraets.org/blog/2009/05/new-test-drive-for-spring-blazeds-integration-rc1/" ></g:plusone>
<!-- End WP Socializer Plugin - +1 Button -->
</span>
	<span class="margin5">
<!-- Start WP Socializer Plugin - Facebook Button -->
<iframe src="http://www.facebook.com/plugins/like.php?&amp;href=http://coenraets.org/blog/2009/05/new-test-drive-for-spring-blazeds-integration-rc1/&amp;layout=button_count&amp;show_faces=0&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowTransparency="true"></iframe>
<!-- End WP Socializer Plugin - Facebook Button -->
</span>
</p>
<p>
<a href="https://twitter.com/ccoenraets" class="twitter-follow-button" data-show-count="false" data-lang="en" data-size="large">Follow @ccoenraets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</p>
	
<!-- Start WP Socializer Plugin - Retweet Button -->
<a href="http://twitter.com/?status=RT @ New Test Drive for Spring BlazeDS Integration RC1 http://coenraets.org/blog/?p=117" target="_blank">Retweet this</a>
<!-- End WP Socializer Plugin - Retweet Button -->

	
	
<!-- Start WP Socializer Plugin - Facebook Button -->
<a href="https://www.facebook.com/sharer.php?u=http%3A%2F%2Fcoenraets.org%2Fblog%2F2009%2F05%2Fnew-test-drive-for-spring-blazeds-integration-rc1%2F" target="_blank">Share on Facebook</a>
<!-- End WP Socializer Plugin - Facebook Button -->



Follow @ccoenraets
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
]]></content:encoded>
			<wfw:commentRss>http://coenraets.org/blog/2009/05/new-test-drive-for-spring-blazeds-integration-rc1/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
	</channel>
</rss>

