<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>J2EE ROAD</title>
	<atom:link href="http://j2eeroad.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://j2eeroad.wordpress.com</link>
	<description>Express Yourself...</description>
	<lastBuildDate>Thu, 03 Nov 2011 15:18:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='j2eeroad.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>J2EE ROAD</title>
		<link>http://j2eeroad.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://j2eeroad.wordpress.com/osd.xml" title="J2EE ROAD" />
	<atom:link rel='hub' href='http://j2eeroad.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Address already in use: JVM_Bind:8080</title>
		<link>http://j2eeroad.wordpress.com/2011/07/13/address-already-in-use-jvm_bind8080/</link>
		<comments>http://j2eeroad.wordpress.com/2011/07/13/address-already-in-use-jvm_bind8080/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 12:20:04 +0000</pubDate>
		<dc:creator>Abdul Aziz</dc:creator>
				<category><![CDATA[Application Server]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AOP]]></category>
		<category><![CDATA[DAO]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Spring MVC]]></category>
		<category><![CDATA[Transaction Management (TM)]]></category>

		<guid isPermaLink="false">http://j2eeroad.wordpress.com/?p=120</guid>
		<description><![CDATA[Do this.. To find the application which is using the 80 port number In “Command Prompt” type the following command: (1) netstat -o -n -a &#124; findstr 0.0:8080 and then (2) taskkill /F /PID 988 Change the PID value from 988to your required port value<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=120&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Do this..</p>
<p>To find the application which is using the 80 port number<br />
In “<strong>Command Prompt</strong>” type the following command:<br />
(1) <em>netstat -o -n -a | findstr 0.0:8080</em><br />
and then<br />
(2) <em>taskkill /F /PID 988</em><br />
Change the PID value from 988to your required port value</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/j2eeroad.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/j2eeroad.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/j2eeroad.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/j2eeroad.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/j2eeroad.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/j2eeroad.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/j2eeroad.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/j2eeroad.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/j2eeroad.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/j2eeroad.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/j2eeroad.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/j2eeroad.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/j2eeroad.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/j2eeroad.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=120&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://j2eeroad.wordpress.com/2011/07/13/address-already-in-use-jvm_bind8080/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd5abecd8dc2194f6a4237bc12753da2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">seeazee</media:title>
		</media:content>
	</item>
		<item>
		<title>Developing Web Services using jax-ws, spring and maven</title>
		<link>http://j2eeroad.wordpress.com/2011/06/15/developing-web-services-using-jax-ws-spring-and-maven-3/</link>
		<comments>http://j2eeroad.wordpress.com/2011/06/15/developing-web-services-using-jax-ws-spring-and-maven-3/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 09:08:17 +0000</pubDate>
		<dc:creator>Abdul Aziz</dc:creator>
				<category><![CDATA[Integration-with-Enterprise-Services]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[AOP]]></category>
		<category><![CDATA[DAO]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Spring MVC]]></category>
		<category><![CDATA[Transaction Management (TM)]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://j2eeroad.wordpress.com/?p=91</guid>
		<description><![CDATA[Using the following steps you can develop soap Web Services using jax-ws, spring and maven plugin Define service interface Define service Implementation Web.xml &#8211; add JAX-WS commons spring ext servlet Spring beans configuration using annotations Spring configurations for Web Services pom.xml &#8211; Add &#8216;jaxws-maven-plugin&#8217; plugin Build deployment using maven Check the web service Test web [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=91&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Using the following steps you can develop soap Web Services using jax-ws, spring and maven plugin</p>
<ol>
<li> Define service interface</li>
<li> Define service Implementation</li>
<li> Web.xml &#8211; add JAX-WS commons spring ext servlet </li>
<li> Spring beans configuration using annotations</li>
<li> Spring configurations for Web Services</li>
<li> pom.xml &#8211; Add &#8216;jaxws-maven-plugin&#8217; plugin</li>
<li> Build deployment using maven</li>
<li> Check the web service</li>
<li> Test web service using sopaUI</li>
<li>Download Source Code <a href="http://goo.gl/y7Dvo" title="mo-ws.zip" target="_blank">mo-ws.zip</a><br />
or war file <a href="http://goo.gl/AMT62" title="mo-ws.war" target="_blank">mo-ws.war</a>
</li>
</ol>
<p><strong>(1) Define service interface</strong><br />
<pre class="brush: java;">
//TemperatureService .java
package uk.co.mo.training.ws;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
@SuppressWarnings(&quot;restriction&quot;)
@WebService
public interface TemperatureService {
	
	@WebMethod
	public double toCelsius(@WebParam(name=&quot;fahrenheit&quot;) double fahrenheit);
	@WebMethod
	public double toFahrenheit(@WebParam(name=&quot;celsius&quot;) double celsius);

}
</pre><br />
<strong>(2) Define service Implementation </strong><br />
<pre class="brush: java;">
//TemperatureServiceImple .java
package uk.co.mo.training.ws;

import javax.jws.WebService;

import org.springframework.stereotype.Service;
@SuppressWarnings(&quot;restriction&quot;)
@WebService(endpointInterface = &quot;uk.co.mo.training.ws.TemperatureService&quot;,serviceName=&quot;temperatureService&quot;)
@Service
public class TemperatureServiceImple implements TemperatureService {


	public double toCelsius(double fahrenheit) {
		double celsius = (5.0 / 9.0) * (fahrenheit - 32.0);
		//C° = (5 / 9)x (F° - 32)  
		return celsius;
	}


	public double toFahrenheit(double celsius) {
		double fahrenheit = (celsius *1.8)+32.0;
		//F° = (C° x 1.8) + 32
		return fahrenheit;
	}

}

</pre></p>
<p><strong>(3) Web.xml &#8211; add JAX-WS commons spring ext servlet</strong><br />
<pre class="brush: xml;">

&lt;!DOCTYPE web-app PUBLIC
 &quot;-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN&quot;
 &quot;http://java.sun.com/dtd/web-app_2_3.dtd&quot; &gt;

&lt;web-app&gt;
   
  &lt;!-- spring framework context configuration --&gt;
  &lt;context-param&gt;
    &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
    &lt;param-value&gt;/WEB-INF/conf/main-application-context.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
 
  
  &lt;!-- Spring Context Listener --&gt;
  &lt;listener&gt;
    &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;    
  &lt;/listener&gt;
  
  &lt;!-- this is for JAX-WS commons spring ext. --&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;jaxws-servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;
        com.sun.xml.ws.transport.http.servlet.WSSpringServlet
      &lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
   &lt;/servlet&gt;
   
   &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;jaxws-servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/webservice/*&lt;/url-pattern&gt;
   &lt;/servlet-mapping&gt;
  
&lt;/web-app&gt;

</pre></p>
<p><strong>(4) Spring beans configuration using annotations</strong><br />
<pre class="brush: xml;">
&lt;!-- main-application-context.xml--&gt;
&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
       xmlns:aop=&quot;http://www.springframework.org/schema/aop&quot;
       xmlns:tx=&quot;http://www.springframework.org/schema/tx&quot;
       xmlns:context=&quot;http://www.springframework.org/schema/context&quot;
       xsi:schemaLocation=&quot;
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
            http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd&quot;&gt;
	    &lt;!—scan annotations --&gt;         
       &lt;context:component-scan base-package=&quot;uk.co.mo.training.ws&quot;/&gt;
       &lt;context:annotation-config/&gt;
       &lt;!-- Web Services --&gt;         
       &lt;import resource=&quot;ws-context.xml&quot;/&gt;        
          
&lt;/beans&gt;

</pre></p>
<p><strong>(5) Spring configurations for Web Services</strong><br />
<pre class="brush: xml;">
&lt;!--  ws-context.xml --&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
	xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
	xmlns:ws=&quot;http://jax-ws.dev.java.net/spring/core&quot;
	xmlns:wss=&quot;http://jax-ws.dev.java.net/spring/servlet&quot;
	xsi:schemaLocation=&quot;
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://jax-ws.dev.java.net/spring/core
    http://jax-ws.dev.java.net/spring/core.xsd
    http://jax-ws.dev.java.net/spring/servlet
    http://jax-ws.dev.java.net/spring/servlet.xsd&quot;&gt;
   
   &lt;!-- Temperature Web Service --&gt;
	&lt;wss:binding url=&quot;/webservice/temperaturewebservice&quot;&gt; 
      &lt;wss:service&gt; 
         &lt;ws:service bean=&quot;#temperatureServiceImple&quot;&gt;             
         &lt;/ws:service&gt; 
      &lt;/wss:service&gt; 
   &lt;/wss:binding&gt; 

   &lt;/beans&gt;

</pre></p>
<p><strong>(6) pom.xml &#8211; Add &#8216;jaxws-maven-plugin&#8217; plugin</strong><br />
<pre class="brush: xml;">
&lt;!-- pom.xml--&gt;
.....
  &lt;build&gt;
    &lt;finalName&gt;mo-ws&lt;/finalName&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
        &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
        &lt;version&gt;2.3.2&lt;/version&gt;
        &lt;configuration&gt;
          &lt;source&gt;1.5&lt;/source&gt;
          &lt;target&gt;1.5&lt;/target&gt;
        &lt;/configuration&gt;
      &lt;/plugin&gt;
      
      	&lt;plugin&gt;
				&lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
				&lt;artifactId&gt;jaxws-maven-plugin&lt;/artifactId&gt;
				&lt;version&gt;1.10&lt;/version&gt;				
			&lt;executions&gt;
				
				&lt;execution&gt;
					&lt;id&gt;TemperatureWS&lt;/id&gt;
					&lt;configuration&gt;
						&lt;sei&gt;uk.co.mo.training.ws.TemperatureServiceImple&lt;/sei&gt;
						&lt;genWsdl&gt;true&lt;/genWsdl&gt;
						&lt;keep&gt;true&lt;/keep&gt;
						&lt;verbose&gt;true&lt;/verbose&gt;
					&lt;/configuration&gt;
					&lt;phase&gt;package&lt;/phase&gt;
					&lt;goals&gt;
						&lt;goal&gt;wsgen&lt;/goal&gt;
					&lt;/goals&gt;
				&lt;/execution&gt;
			&lt;/executions&gt;				
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
....

</pre></p>
<p><strong>(7) Build deployment using maven: Run (1) &#8220;mvn clean package&#8221; and again (2)  &#8220;mvn package&#8221;</strong><br />
<pre class="brush: java;">
&quot;mvn clean package&quot; - it will create required WSDL files at &quot;/target/jaxws/wsgen/wsdl&quot;
&quot;mvn package&quot; it will create some files at &quot;/target/mo-ws/WEB-INF/classes/uk/co/mo/training/ws/jaxws&quot;
</pre><br />
<strong>(8) Deploy in the tomcat</strong><br />
<pre class="brush: xml;">
&lt;!-- server.xml--&gt;
...
&lt;Context
			docBase=&quot;D:/projects/mo-ws-project/target/mo-ws&quot;
			path=&quot;/ws&quot;&gt;
					
	&lt;/Context&gt;
...

</pre></p>
<p><strong>(9) Check the web service	<a href="http://localhost:8080/ws/webservice/temperaturewebservice" title="http://localhost:8080/ws/webservice/temperaturewebservice" target="_blank">http://localhost:8080/ws/webservice/temperaturewebservice</strong></a></p>
<p><strong>(10) Using <a href="http://www.soapui.org/Getting-Started/installing-on-windows.html" title="soapUI" target="_blank">soapUI </a>test web service</strong></p>
<p><strong>(11) Download Source Code</strong> <a href="http://goo.gl/y7Dvo" title="mo-ws.zip" target="_blank">mo-ws.zip</a> or war file at <a href="http://goo.gl/AMT62" title="mo-ws.war" target="_blank">mo-ws.war</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/j2eeroad.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/j2eeroad.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/j2eeroad.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/j2eeroad.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/j2eeroad.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/j2eeroad.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/j2eeroad.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/j2eeroad.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/j2eeroad.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/j2eeroad.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/j2eeroad.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/j2eeroad.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/j2eeroad.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/j2eeroad.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=91&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://j2eeroad.wordpress.com/2011/06/15/developing-web-services-using-jax-ws-spring-and-maven-3/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd5abecd8dc2194f6a4237bc12753da2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">seeazee</media:title>
		</media:content>
	</item>
		<item>
		<title>Testing Using Junit 4, Jmock &amp; Spring mock</title>
		<link>http://j2eeroad.wordpress.com/2010/02/07/testing-using-junit-4-jmock-spring-mock/</link>
		<comments>http://j2eeroad.wordpress.com/2010/02/07/testing-using-junit-4-jmock-spring-mock/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 10:31:22 +0000</pubDate>
		<dc:creator>Abdul Aziz</dc:creator>
				<category><![CDATA[Integration Testing]]></category>
		<category><![CDATA[Junit]]></category>
		<category><![CDATA[Mock Testing]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[JMick]]></category>
		<category><![CDATA[Junit4]]></category>
		<category><![CDATA[Spring mock]]></category>

		<guid isPermaLink="false">http://j2eeroad.wordpress.com/2010/02/07/testing-using-junit-4-jmock-spring-mock/</guid>
		<description><![CDATA[What If the Code Has Dependencies? The solution is Using Mock Objects We use mock objects during testing for two main reasons: to isolate the class under test from outside influence and to control dependencies. If the dependency is a simple POJO, using the new operator is an easy way to create an instance used [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=72&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:10pt;">What If the Code Has Dependencies?<br />
</span></p>
<p><span style="font-size:10pt;">The solution is<strong> Using Mock Objects<br />
</strong></span></p>
<p><span style="font-size:10pt;">We use mock objects during testing for two main reasons: to isolate the class under test from outside influence and to control dependencies.<br />
</span></p>
<p><span style="font-size:10pt;"><strong>If the dependency is a simple POJO</strong>, using the new operator is an easy way to create an instance used just for the test. However, <strong>if the dependency is not easily created or requires heavyweight resources</strong> such as database connections, using the new operator isn&#8217;t often possible. <strong>Mock objects</strong> step in to &#8220;mock&#8221; the dependency, thus allowing the code under test to operate without invoking outside resources.<span style="text-decoration:underline;"><br />
</span></span></p>
<p><span style="font-size:10pt;"><strong>Mock objects</strong> are used when you need to either replace a <strong>heavyweight dependency</strong> with a lightweight instance just for testing, or when you need to use an intelligent stub. Those two situations often occur simultaneously, making mock objects a perfect addition to any testing tool belt.<br />
</span></p>
<p>The following example shows how we can test application component that has DAO (heavy weight) dependency using <a title="Jmock API" href="http://www.jmock.org/" target="_blank">jmock </a>objects  and web layer (Controller)  using <a title="Spring mock testing" href="http://static.springsource.org/spring/docs/2.5.6/reference/testing.html" target="_blank">spring mock</a> api.</p>
<div id="_mcePaste"><pre class="brush: java;">@RunWith(JMock.class)
public class HomeControllerTest {

	Mockery context = new JUnit4Mockery();
	//mock object : ContactDAO (using JMock)
	ContactDAOInterface contactDAO = context.mock(ContactDAOInterface.class);
	// Spring MVC controller
	HomeController cc = new HomeController();
	// mock objects (using spring mock)
	private MockHttpServletRequest request;
	private MockHttpServletResponse response;

	@Before
	public void init() throws Exception
	{
		cc.setContactDAO(contactDAO);
		// mock objects created
		request = new MockHttpServletRequest();
		response = new MockHttpServletResponse();
	}

	@Test
	public void HomePage() throws Exception
	{
		// define expectations for mock object
		context.checking(new Expectations() {{
			ArrayList&lt;ContactData&gt; data = new ArrayList&lt;ContactData&gt;();
			data.add(new ContactData(1,&quot;Abdul Aziz&quot;,&quot;07525776781&quot;));
	        oneOf (contactDAO).getContacts(); will(returnValue(data));
	    }});

		// test
		request.setMethod(&quot;GET&quot;);
		ModelAndView mav= cc.handleRequest(request, response);
		Assert.assertEquals(&quot;viewContacts&quot;, mav.getViewName());
		ArrayList&lt;ContactData&gt; obj=(ArrayList&lt;ContactData&gt;)mav.getModel().get(&quot;contacts&quot;);
		Assert.assertNotNull(obj);
		Assert.assertEquals(1,obj.size());
		Assert.assertEquals(&quot;Abdul Aziz&quot;,obj.get(0).getName());
		Assert.assertEquals(&quot;07525776781&quot;,obj.get(0).getPhone());
	}
}</pre></p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/j2eeroad.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/j2eeroad.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/j2eeroad.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/j2eeroad.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/j2eeroad.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/j2eeroad.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/j2eeroad.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/j2eeroad.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/j2eeroad.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/j2eeroad.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/j2eeroad.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/j2eeroad.wordpress.com/72/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/j2eeroad.wordpress.com/72/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/j2eeroad.wordpress.com/72/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=72&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://j2eeroad.wordpress.com/2010/02/07/testing-using-junit-4-jmock-spring-mock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd5abecd8dc2194f6a4237bc12753da2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">seeazee</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring Security: Authorization (Controlling Access) Configurations</title>
		<link>http://j2eeroad.wordpress.com/2010/01/23/spring-security-authorization-controlling-access-configurations/</link>
		<comments>http://j2eeroad.wordpress.com/2010/01/23/spring-security-authorization-controlling-access-configurations/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 10:51:51 +0000</pubDate>
		<dc:creator>Abdul Aziz</dc:creator>
				<category><![CDATA[Integration-with-Enterprise-Services]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[AOP]]></category>
		<category><![CDATA[DAO]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Spring MVC]]></category>
		<category><![CDATA[Transaction Management (TM)]]></category>

		<guid isPermaLink="false">http://j2eeroad.wordpress.com/2010/01/25/spring-security-authorization-controlling-access-configurations/</guid>
		<description><![CDATA[An access decision manager is responsible for deciding whether the user has the proper privileges to access secured resources. Access decision managers are defined by the org.acegisecurity.AccessDecisionManager interface:       public interface AccessDecisionManager {           public void decide(Authentication authentication, Object object,             ConfigAttributeDefinition config)             throws AccessDeniedException,             InsufficientAuthenticationException;         public boolean supports(ConfigAttribute attribute);         public boolean supports(Class clazz);     }   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=45&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:10pt;"><span style="font-family:Times New Roman;">An </span><span style="font-family:Times New Roman;"><em><strong>access decision manager</strong><br />
				</em></span><span style="font-family:Times New Roman;">is responsible for deciding whether the user has the proper privileges to access secured resources. Access decision managers are defined by the<br />
</span></span></p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:#0070c0;">org.acegisecurity.AccessDecisionManager</span><br />
		</span><span style="font-family:Times New Roman;font-size:10pt;">interface:<br />
</span></p>
<p style="background:#f2f2f2;">
 </p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;">    </span><span style="color:#7f0055;"><strong>public</strong></span><span style="color:black;"><br />
			</span><span style="color:#7f0055;"><strong>interface</strong></span><span style="color:black;"> AccessDecisionManager {<br />
</span></span></p>
<p style="background:#f2f2f2;">
 </p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;">        </span><span style="color:#7f0055;"><strong>public</strong></span><span style="color:black;"><br />
			</span><span style="color:#7f0055;"><strong>void</strong></span><span style="color:black;"><br />
				<strong>decide</strong>(Authentication authentication, Object object,</span><br />
		</span></p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;">            ConfigAttributeDefinition config)</span><br />
		</span></p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;">            </span><span style="color:#7f0055;"><strong>throws</strong></span><span style="color:black;"> AccessDeniedException,</span><br />
		</span></p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;">            InsufficientAuthenticationException;</span><br />
		</span></p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;">        </span><span style="color:#7f0055;"><strong>public</strong></span><span style="color:black;"><br />
			</span><span style="color:#7f0055;"><strong>boolean</strong></span><span style="color:black;"><br />
				<strong>supports</strong>(ConfigAttribute attribute);</span><br />
		</span></p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;">        </span><span style="color:#7f0055;"><strong>public</strong></span><span style="color:black;"><br />
			</span><span style="color:#7f0055;"><strong>boolean</strong></span><span style="color:black;"><br />
				<strong>supports</strong>(Class clazz);</span><br />
		</span></p>
<p style="background:#f2f2f2;"><span style="color:black;font-family:Courier New;font-size:10pt;">    }<br />
</span></p>
<p style="background:white;">
 </p>
<p><span style="font-family:Times New Roman;font-size:10pt;">The </span><span style="color:#0070c0;font-family:Courier New;font-size:10pt;">decide()</span><span style="font-family:Times New Roman;font-size:10pt;">method is where the ultimate decision is made. If it returns without throwing an </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:#0070c0;">AccessDeniedException</span><br />
		</span><span style="font-family:Times New Roman;font-size:10pt;">or <span style="color:#0070c0;">InsufficientAuthenticationException</span>, access to the secured resource is granted. Otherwise, access is denied.<br />
</span></p>
<p>
 </p>
<p><span style="font-family:Times New Roman;font-size:10pt;"><strong>Decision by Voting:<br />
</strong></span></p>
<p><span style="font-family:Times New Roman;font-size:10pt;">Spring Security&#8217;s <span style="text-decoration:underline;">access decision managers are ultimately responsible for determining the access rights</span> for an authenticated user. They poll one or more objects that vote on whether or not a user is granted access to a secured resource. Once all votes are in, the decision manager tallies the votes and arrives at its final decision.<br />
</span></p>
<p>
 </p>
<p>
 </p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:teal;">&lt;</span><span style="color:#3f7f7f;">bean </span><span style="color:#7f007f;">id</span><span style="color:black;">=</span><span style="color:#2a00ff;">&#8220;accessDecisionManager&#8221; </span><span style="color:#7f007f;">class</span><span style="color:black;">=</span><span style="color:#2a00ff;">&#8220;org.acegisecurity.vote.UnanimousBased&#8221;</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:teal;">&lt;</span><span style="color:#3f7f7f;">property </span><span style="color:#7f007f;">name</span><span style="color:black;">=</span><span style="color:#2a00ff;">&#8220;decisionVoters&#8221;</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:teal;">&lt;</span><span style="color:#3f7f7f;">list</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:teal;">&lt;</span><span style="color:#3f7f7f;">ref </span><span style="color:#7f007f;">bean</span><span style="color:black;">=</span><span style="color:#2a00ff;">&#8220;roleVoter&#8221;</span><span style="color:teal;">/&gt;</span><br />
		</span></p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:teal;">&lt;/</span><span style="color:#3f7f7f;">list</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:teal;">&lt;/</span><span style="color:#3f7f7f;">property</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="background:#f2f2f2;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:teal;">&lt;/</span><span style="color:#3f7f7f;">bean</span><span style="color:teal;">&gt;<br />
</span></span></p>
<p>
 </p>
<p><span style="font-family:Times New Roman;font-size:10pt;">The </span><span style="font-family:Courier New;font-size:10pt;">decisionVoters </span><span style="font-family:Times New Roman;font-size:10pt;">property is where you provide the access decision manager with its list of voters.</span><span style="color:teal;font-family:Courier New;font-size:10pt;"><br />
		</span></p>
<p>
 </p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:teal;background-color:#f2f2f2;">&lt;</span><span style="color:#3f7f7f;background-color:#f2f2f2;">bean </span><span style="color:#7f007f;background-color:#f2f2f2;">id</span><span style="color:black;background-color:#f2f2f2;">=</span><span style="color:#2a00ff;background-color:#f2f2f2;">&#8220;roleVoter&#8221; </span><span style="color:#7f007f;background-color:#f2f2f2;">class</span><span style="color:black;background-color:#f2f2f2;">=</span><span style="color:#2a00ff;background-color:#f2f2f2;">&#8220;org.acegisecurity.vote.RoleVoter&#8221;</span><span style="color:teal;"><span style="background-color:#f2f2f2;">/&gt;</span><br />
			</span></span></p>
<p>
 </p>
<p><span style="font-family:Courier New;font-size:10pt;">RoleVoter </span><span style="font-family:Times New Roman;font-size:10pt;">only votes when the secured resource has configuration attributes that are prefixed with </span><span style="font-family:Courier New;font-size:10pt;">ROLE_<br />
</span></p>
<p>
 </p>
<p><span style="font-family:Times New Roman;font-size:10pt;">By default, all the access decision managers deny access to a resource if all the voters abstain. However, you can override this default behavior by setting the </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:#0070c0;">allowIfAllAbstain</span><br />
		</span><span style="font-family:Times New Roman;font-size:10pt;">property on the access decision manager to true.<br />
</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/j2eeroad.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/j2eeroad.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/j2eeroad.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/j2eeroad.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/j2eeroad.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/j2eeroad.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/j2eeroad.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/j2eeroad.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/j2eeroad.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/j2eeroad.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/j2eeroad.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/j2eeroad.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/j2eeroad.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/j2eeroad.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=45&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://j2eeroad.wordpress.com/2010/01/23/spring-security-authorization-controlling-access-configurations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd5abecd8dc2194f6a4237bc12753da2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">seeazee</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring Web Services</title>
		<link>http://j2eeroad.wordpress.com/2010/01/21/spring-web-services/</link>
		<comments>http://j2eeroad.wordpress.com/2010/01/21/spring-web-services/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 10:53:08 +0000</pubDate>
		<dc:creator>Abdul Aziz</dc:creator>
				<category><![CDATA[Integration-with-Enterprise-Services]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[AOP]]></category>
		<category><![CDATA[DAO]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Spring MVC]]></category>
		<category><![CDATA[Transaction Management (TM)]]></category>

		<guid isPermaLink="false">http://j2eeroad.wordpress.com/2010/01/25/spring-web-services/</guid>
		<description><![CDATA[Spring provides full support for standard Java web services APIs: Web services using JAX-RPC and Web services using JAX-WS  Spring Web Services, a solution for contract-first, document-driven web services;  XFire also allows you to export Spring-managed beans as a web service, through built-in spring support Exposing web services Using JAX-RPC: Spring provides a convenience base class [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=47&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:black;font-family:Arial;font-size:10pt;">Spring provides full support for standard Java web services APIs: Web services using <strong>JAX-RPC </strong>and<strong><br />
			</strong>Web services using <strong>JAX-WS<br />
</strong></span></p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;"> <span style="text-decoration:underline;"><strong>Spring Web Services</strong></span>, a solution for </span><span style="color:#0070c0;">contract-first</span><span style="color:black;">, document-driven web services;<br />
</span></span></p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;"> <a href="http://xfire.codehaus.org"></span><strong>XFire</strong><span style="color:black;"> also allows you to export <span style="text-decoration:underline;">Spring-managed beans</span> as a <span style="text-decoration:underline;">web service</span>, through built-in spring support<br />
</span></span></p>
<p><span style="color:black;font-family:Arial;font-size:10pt;"><strong>Exposing web services Using JAX-RPC:<br />
</strong></span></p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Spring provides a convenience base class for </span><span style="color:#0070c0;">JAX-RPC</span><span style="color:black;"> servlet endpoint implementations - </span><span style="color:#0070c0;">ServletEndpointSupport</span><span style="color:black;">.<br />
</span></span></p>
<p>
 </p>
<p><span style="color:black;font-family:Arial;font-size:10pt;"><strong>Accessing web services using JAX-RPC<br />
</strong></span></p>
<p><span style="color:black;"><span style="font-family:Verdana;font-size:10pt;">From the client code we can access the web service just as if it was a normal class, except that it throws </span><span style="font-family:Courier New;font-size:12pt;">RemoteException</span><span style="font-family:Verdana;font-size:10pt;">.<br />
</span></span></p>
<p>
 </p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Spring provides two factory beans to create JAX-RPC web service proxies, namely </span><span style="color:#0070c0;">LocalJaxRpcServiceFactoryBean</span><span style="color:black;"> </span><span style="color:#0070c0;">andJaxRpcPortProxyFactoryBean</span><span style="color:black;">. The former can only return a JAX-RPC service class for us to work with. The latter is the full-fledged version that can return a proxy that implements our business service interface<br />
</span></span></p>
<p><span style="font-family:Arial;font-size:10pt;"><strong><span style="color:black;">Exposing </span><span style="color:#0070c0;">servlet-based web services</span><span style="color:black;"> using JAX-WS<br />
</span></strong></span></p>
<p>
 </p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Spring provides a convenient base class for JAX-WS servlet endpoint implementations – </span><span style="color:#0070c0;">SpringBeanAutowiringSupport<br />
</span></span></p>
<p><span style="font-family:Arial;font-size:10pt;"><strong><span style="color:black;">Exporting </span><span style="color:#0070c0;">standalone web services</span><span style="color:black;"> using JAX-WS<br />
</span></strong></span></p>
<p>
 </p>
<p><span style="color:black;font-family:Arial;font-size:10pt;"><strong>Exposing web services using XFire<br />
</strong></span></p>
<p><span style="color:black;font-family:Verdana;font-size:10pt;">XFire is a lightweight SOAP library<br />
</span></p>
<p>
 </p>
<p><span style="font-family:Arial;font-size:10pt;"><strong><span style="text-decoration:underline;">Contract-first web services</span>: </strong>The steps for developing a contract-first web service<br />
</span></p>
<ol>
<li><span style="font-family:Arial;font-size:10pt;"><strong>Define the service contract</strong> – This involves designing sample <span style="color:#0070c0;">XML</span><br />
				<span style="color:#0070c0;">messages</span> that will be processed by our web service. We&#8217;ll use these sample messages to create <span style="color:#0070c0;">XML Schema</span> that will later be used to create <span style="color:#0070c0;">WSDL</span>.<strong><br />
				</strong></span></li>
<li><span style="font-family:Arial;font-size:10pt;"><strong>Write a service endpoint</strong>. – We&#8217;ll create classes that will receive and process the messages sent to the web service.<strong><br />
				</strong></span></li>
<li><span style="font-family:Arial;font-size:10pt;"><strong>Configure the endpoint and Spring-WS infrastructure – </strong></span><span style="font-family:Arial;font-size:8pt;">We&#8217;ll wire up our service endpoint along with a handful of Spring-WS beans that will tie everything together</span><span style="font-family:Arial;font-size:10pt;"><strong><br />
				</strong></span></li>
</ol>
<p>
 </p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:#0070c0;"><strong>MessageDispatcherServlet</strong></span><br />
		</span><span style="font-family:Times New Roman;"><span style="font-size:10pt;">is only the <span style="text-decoration:underline;">front end of Spring-</span></span><span style="font-size:9pt;"><span style="text-decoration:underline;">WS</span><br />
			</span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/j2eeroad.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/j2eeroad.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/j2eeroad.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/j2eeroad.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/j2eeroad.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/j2eeroad.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/j2eeroad.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/j2eeroad.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/j2eeroad.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/j2eeroad.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/j2eeroad.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/j2eeroad.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/j2eeroad.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/j2eeroad.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=47&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://j2eeroad.wordpress.com/2010/01/21/spring-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd5abecd8dc2194f6a4237bc12753da2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">seeazee</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring: Security Basics</title>
		<link>http://j2eeroad.wordpress.com/2010/01/21/spring-security-basics-2/</link>
		<comments>http://j2eeroad.wordpress.com/2010/01/21/spring-security-basics-2/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 10:52:24 +0000</pubDate>
		<dc:creator>Abdul Aziz</dc:creator>
				<category><![CDATA[Integration-with-Enterprise-Services]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[AOP]]></category>
		<category><![CDATA[DAO]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Spring MVC]]></category>
		<category><![CDATA[Transaction Management (TM)]]></category>

		<guid isPermaLink="false">http://j2eeroad.wordpress.com/2010/01/25/spring-security-basics-2/</guid>
		<description><![CDATA[Spring Security is a security framework that provides declarative security for your Spring-based applications. It provides handling authentication and authorization, at both the web request level and at the method invocation level.   For securing web applications, Spring Security uses servlet filters that intercept servlet requests to perform authentication and enforce security. When securing methods, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=46&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:Arial;font-size:10pt;">Spring Security is a security framework that provides declarative security for your Spring-based applications. It provides handling <span style="color:#0070c0;">authentication</span> and <span style="color:#0070c0;">authorization</span>, at both the <span style="text-decoration:underline;"><strong>web request level</strong></span> and at the <span style="text-decoration:underline;"><strong>method invocation level.<br />
</strong></span></span></p>
<p>
 </p>
<p><span style="font-family:Arial;font-size:10pt;">For <span style="color:#0070c0;">securing web applications,</span> Spring Security uses <span style="text-decoration:underline;"><strong>servlet filters</strong></span> that intercept servlet requests to perform authentication and enforce security. When <span style="color:#0070c0;">securing methods</span>, Spring Security uses <span style="text-decoration:underline;"><strong>Spring AOP</strong></span> to proxy objects, applying aspects that ensure that the user has proper authority to invoke the secured methods.<br />
</span></p>
<p>
 </p>
<p>
 </p>
<p><span style="font-family:Arial;font-size:10pt;"><strong>Security Interceptors:<br />
</strong></span></p>
<p><span style="font-family:Arial;font-size:10pt;">The actual implementation of a security interceptor will depend on what resource is being secured. If you&#8217;re securing a URL in a web application, the security interceptor will be implemented as a <span style="color:#0070c0;">servlet filter</span>. But if you&#8217;re securing a method invocation, <span style="color:#0070c0;">aspects</span> will be used to enforce security. It <span style="text-decoration:underline;">does not actually apply security rules</span>. Instead, it <span style="text-decoration:underline;">delegates that responsibility to the various managers.<br />
</span></span></p>
<p>
 </p>
<ul>
<li><span style="font-family:Arial;font-size:10pt;"><span style="color:#0070c0;">Authentication</span> managers<br />
</span></li>
<li><span style="font-family:Arial;font-size:10pt;"><span style="color:#0070c0;">Access decisions</span> managers<br />
</span></li>
<li><span style="font-family:Arial;font-size:10pt;"><span style="color:#0070c0;">Run-as</span> managers<br />
</span></li>
<li><span style="font-family:Arial;font-size:10pt;"><span style="color:#0070c0;">After-invocation</span> managers<br />
</span></li>
</ul>
<p>
 </p>
<p><span style="font-family:Arial;font-size:10pt;"><strong>Authentication managers:<br />
</strong></span></p>
<p><span style="font-family:Arial;font-size:10pt;">The authentication manager is responsible for determining who you are. It does this by considering your <em><span style="color:#0070c0;">principal</span><br />
			</em>(username) and your <em><span style="color:#0070c0;">credentials</span><br />
			</em>(password). The <span style="text-decoration:underline;">authentication manager is a pluggable interface-based component</span>. This makes it possible to use Spring Security with virtually any authentication mechanism you can imagine. Spring Security comes with authentication managers. <strong><br />
			</strong></span></p>
<p>
 </p>
<p><span style="font-family:Arial;font-size:10pt;"><strong>Access decisions managers:<br />
</strong></span></p>
<p><span style="font-family:Arial;font-size:10pt;">The access decision manager performs authorization, deciding whether to let you in by considering your authentication information and the security attributes that have been associated with the secured resource. The access decision manager is also pluggable.<br />
</span></p>
<p>
 </p>
<p><span style="font-family:Arial;font-size:10pt;"><strong>Run-as managers:<br />
</strong></span></p>
<p><span style="font-family:Arial;font-size:10pt;">A run-as manager can be used to replace your authentication with an authentication that allows you access to the secured objects that are deeper in your application. <span style="text-decoration:underline;">Run-as managers are an optional security component</span> and are not necessary in many applications secured by Spring Security.<br />
</span></p>
<p>
 </p>
<p><span style="font-family:Arial;font-size:10pt;"><strong>After-invocation managers:<br />
</strong></span></p>
<p><span style="font-family:Arial;font-size:10pt;">The after-invocation manager <span style="text-decoration:underline;">enforces security after the secured resource is accessed</span>. The after-invocation manager also has the <span style="text-decoration:underline;">option of altering the returned value</span> to ensure that the user is only able to access certain properties of the returned object. Applications only need an after-invocation manager if the application&#8217;s security scheme requires that access be restricted at the domain level on a per-instance basis.<br />
</span></p>
<p><span style="font-family:Times New Roman;font-size:10pt;"><br />
		</span> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/j2eeroad.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/j2eeroad.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/j2eeroad.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/j2eeroad.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/j2eeroad.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/j2eeroad.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/j2eeroad.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/j2eeroad.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/j2eeroad.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/j2eeroad.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/j2eeroad.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/j2eeroad.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/j2eeroad.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/j2eeroad.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=46&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://j2eeroad.wordpress.com/2010/01/21/spring-security-basics-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd5abecd8dc2194f6a4237bc12753da2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">seeazee</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring Remoting</title>
		<link>http://j2eeroad.wordpress.com/2010/01/20/spring-remoting/</link>
		<comments>http://j2eeroad.wordpress.com/2010/01/20/spring-remoting/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 10:51:12 +0000</pubDate>
		<dc:creator>Abdul Aziz</dc:creator>
				<category><![CDATA[Implementing-Enterprise-Information-Connectivity]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[AOP]]></category>
		<category><![CDATA[DAO]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Spring MVC]]></category>
		<category><![CDATA[Transaction Management (TM)]]></category>

		<guid isPermaLink="false">http://j2eeroad.wordpress.com/2010/01/25/spring-remoting/</guid>
		<description><![CDATA[    Spring and POJO-based remote services   Remote Method Invocation (RMI) – Accessing/exposing Java-based services when network constraints aren&#8217;t a factor Hessian or Burlap – Accessing/exposing Java-based services over HTTP when network constraints are a factor HTTP Invoker – Accessing/exposing Spring-based services over HTTP when network constraints are a factor JAX-RPC/SOAP – Accessing/exposing platform-neutral, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=44&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="margin-left:36pt;">
 </p>
<p style="margin-left:36pt;">
 </p>
<p style="margin-left:18pt;"><span style="color:black;font-family:Arial;font-size:12pt;"><strong>Spring and POJO-based remote services<br />
</strong></span></p>
<p style="margin-left:18pt;">
 </p>
<p style="margin-left:18pt;"><span style="font-family:Arial;font-size:10pt;"><span style="color:black;"><strong>Remote Method Invocation (RMI)</strong> – Accessing/exposing </span><span style="color:#0070c0;">Java-based services</span><span style="color:black;"> when network constraints aren&#8217;t a factor<br />
</span></span></p>
<p style="margin-left:18pt;"><span style="font-family:Arial;font-size:10pt;"><span style="color:black;"><strong>Hessian or Burlap</strong> – Accessing/exposing </span><span style="color:#0070c0;">Java-based services over HTTP</span><span style="color:black;"> when network constraints are a factor<br />
</span></span></p>
<p style="margin-left:18pt;"><span style="font-family:Arial;font-size:10pt;"><span style="color:black;"><strong>HTTP Invoker</strong> – Accessing/exposing </span><span style="color:#0070c0;">Spring-based services over HTTP</span><span style="color:black;"> when network constraints are a factor<br />
</span></span></p>
<p style="margin-left:18pt;"><span style="font-family:Arial;font-size:10pt;"><span style="color:#7f7f7f;"><strong>JAX-RPC/SOAP</strong> – Accessing/exposing </span><span style="color:#0070c0;">platform-neutral</span><span style="color:#7f7f7f;">, </span><span style="color:#0070c0;">SOAP</span><span style="color:#7f7f7f;">-based web-services<br />
</span></span></p>
<p style="margin-left:18pt;">
 </p>
<p style="margin-left:18pt;"><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">In all models, services can be configured into your application as </span><span style="color:#0070c0;">spring managed beans</span><span style="color:black;">. This is accomplished using a </span><span style="color:#0070c0;">proxy factory bean</span><span style="color:black;"> that enables you to wire remote services into properties of your other beans as if they were local objects.<br />
</span></span></p>
<p style="margin-left:18pt;">
 </p>
<p style="margin-left:18pt;"><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">If the call to the remote service results in a </span><span style="color:#0070c0;">java.rmi.RemoteException</span><span style="color:black;">, the proxy handles that exception and rethrows it as an unchecked </span><span style="color:#0070c0;">org.springframework.remoting.<strong>RemoteAccessException</strong></span><span style="color:black;"><br />
			</span></span></p>
<p style="margin-left:18pt;">
 </p>
<p style="margin-left:18pt;"><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">On the service side, <span style="text-decoration:underline;">you are able to expose the functionality of any </span></span><span style="text-decoration:underline;"><span style="color:#0070c0;">spring managed bean</span><span style="color:black;"> as a </span><span style="color:#0070c0;">remote service</span></span><span style="color:black;"><span style="text-decoration:underline;"> using any of the models</span><br />
			</span></span></p>
<p style="margin-left:36pt;">
 </p>
<ol>
<li><span style="color:black;font-family:Arial;font-size:12pt;"><strong>Using the RMI<br />
</strong></span></li>
</ol>
<p>
 </p>
<p><span style="color:black;font-family:Arial;font-size:10pt;">Using spring&#8217;s support for RMI, you basically need a configuration similar to remote EJBs, except for the fact that there is no standard support for security context propagation or remote transaction propagation. <span style="text-decoration:underline;">Spring does provide hooks for such additional invocation context when using the RMI invoker<br />
</span></span></p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Using the </span><span style="color:#0070c0;">RmiServiceExporter</span><span style="color:black;">, The interface can be accessed by using </span><span style="color:#0070c0;">RmiProxyFactoryBean</span><span style="color:black;">, <strong>or</strong> via </span><span style="color:#0070c0;">plain RMI</span><span style="color:black;"> in case of a traditional RMI service. The RmiServiceExporter explicitly supports the exposing of any non-RMI services via RMI invokers.<br />
</span></span></p>
<p><span style="color:black;font-family:Arial;font-size:10pt;"><strong>Exposing services:<br />
</strong></span></p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;bean id="accountService" class="com.example.AccountServiceImpl"&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="font-family:Arial;"><span style="color:black;">
					</span><span style="color:green;"><em>&lt;!-- any additional properties, maybe a DAO? --&gt;</em></span><span style="color:black;">
					</span></span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;/bean&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
 </p>
<p style="background:#d9d9d9;"><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">&lt;bean class=&#8221;org.springframework.remoting.rmi.</span><span style="color:#0070c0;"><strong>RmiServiceExporter</strong></span><span style="color:black;">&#8220;&gt;<br />
</span></span></p>
<p style="background:#d9d9d9;"><span style="font-family:Arial;font-size:10pt;"><span style="color:black;"><br />
			</span><span style="color:green;"><em>&lt;!&#8211; does not necessarily have to be the same name as the bean to be exported &#8211;&gt;</em></span><span style="color:black;"><br />
			</span></span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">    &lt;property name=&#8221;serviceName&#8221; value=&#8221;AccountService&#8221;/&gt;<br />
</span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">    &lt;property name=&#8221;service&#8221; ref=&#8221;accountService&#8221;/&gt;<br />
</span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">    &lt;property name=&#8221;serviceInterface&#8221; value=&#8221;com.example.AccountService&#8221;/&gt;<br />
</span></p>
<p style="background:#d9d9d9;"><span style="font-family:Arial;font-size:10pt;"><span style="color:black;"><br />
			</span><span style="color:green;"><em>&lt;!&#8211; defaults to 1099 &#8211;&gt;</em></span><span style="color:black;"><br />
			</span></span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">    &lt;property name=&#8221;registryPort&#8221; value=&#8221;1199&#8243;/&gt;<br />
</span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">&lt;/bean&gt;<br />
</span></p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">The service will be bound </span>at<span style="color:#0070c0;"> rmi://HOST:1199/AccountService </span><span style="color:black;"> We&#8217;ll use the URL later on to link in the service at the client side<br />
</span></span></p>
<p><span style="color:black;font-family:Arial;font-size:10pt;"><strong>Linking in the service at the client<br />
</strong></span></p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;bean class="example.SimpleObject"&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;property name="accountService" ref="accountService"/&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;/bean&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
 </p>
<p style="background:#d9d9d9;">
<pre><code><span style="font-family:Arial;"><span style="color:black;">&lt;bean id="accountService" class="org.springframework.remoting.rmi.</span><span style="color:#0070c0;"><strong>RmiProxyFactoryBean</strong></span><span style="color:black;">"&gt;
</span></span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="font-family:Arial;"><span style="color:black;">    &lt;property name="serviceUrl" value="</span><span style="color:#0070c0;">rmi://HOST:1199/AccountService</span><span style="color:black;">"/&gt;
</span></span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;property name="serviceInterface" value="example.AccountService"/&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;/bean&gt;
</span></code></pre>
</p>
<p>
 </p>
<p>
 </p>
<ol>
<li><span style="color:black;font-family:Arial;font-size:12pt;"><strong>Using Hessian or Burlap to remotely call services via HTTP<br />
</strong></span></li>
</ol>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Hessian offers a binary </span><span style="color:#0070c0;">HTTP-based remoting protocol</span><span style="color:black;">. One of the advantages of </span><span style="color:#0070c0;">Hessian</span><span style="color:black;"> and </span><span style="color:#0070c0;">Burlap</span><span style="color:black;"> is that we can easily apply </span><span style="color:#0070c0;">HTTP basic authentication</span><span style="color:black;">.<br />
</span></span></p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Both </span><span style="color:#0070c0;">protocols are HTTP-based</span><span style="color:black;">,<br />
</span></span></p>
<p><span style="color:black;font-family:Arial;font-size:10pt;">Hessian communicates via HTTP and does so using a custom Servlet; So we need a new Servlet configuration<br />
</span></p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;servlet&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;servlet-name&gt;remoting&lt;/servlet-name&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;/servlet&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
 </p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;servlet-mapping&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;servlet-name&gt;remoting&lt;/servlet-name&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;url-pattern&gt;/remoting/*&lt;/url-pattern&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;/servlet-mapping&gt;
</span></code></pre>
</p>
<p>
 </p>
<p><span style="color:black;font-family:Arial;font-size:10pt;"><strong>Exposing Services:<br />
</strong></span></p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Defined in </span><span style="color:#0070c0;">remoting-servlet.xml</span><span style="color:black;"><br />
			</span></span></p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;bean id="accountService" class="example.AccountServiceImpl"&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="font-family:Arial;"><span style="color:black;">
					</span><span style="color:green;"><em>&lt;!-- any additional properties, maybe a DAO? --&gt;</em></span><span style="color:black;">
					</span></span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;/bean&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
 </p>
<p style="background:#d9d9d9;">
<pre><code><span style="font-family:Arial;"><span style="color:black;">&lt;bean name="/AccountService" class="org.springframework.remoting.caucho.</span><span style="color:#0070c0;"><strong>HessianServiceExporter</strong></span><span style="color:black;">"&gt;
</span></span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;property name="service" ref="accountService"/&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;property name="serviceInterface" value="example.AccountService"/&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;/bean&gt;
</span></code></pre>
</p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Now we&#8217;re ready to link in the service at the client. No explicit handler mapping is specified, mapping request URLs onto services, so BeanNameUrlHandlerMapping will be used: Hence, the service will be exported at the URL indicated through its bean name within the containing DispatcherServlet&#8217;s mapping (as defined above): </span><span style="color:#0070c0;">&#8216;http://HOST:8080/remoting/AccountService&#8217;</span><span style="color:black;">.<br />
</span></span></p>
<p><span style="color:black;font-family:Arial;font-size:10pt;"><strong>Alternative Way<br />
</strong></span></p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Alternatively, consider the use of Spring&#8217;s simpler <strong>HttpRequestHandlerServlet</strong>. This allows you to embed the </span><span style="color:#0070c0;">remote exporter</span><span style="color:black;"> definitions in your </span><span style="color:#0070c0;">root application context</span><span style="color:black;"> (by default in &#8217;WEB-INF/applicationContext.xml&#8217;), with individual servlet definitions pointing to specific exporter beans. </span><span style="text-decoration:underline;">Each servlet name needs to match the bean name of its target exporter in this case</span><span style="color:black;"><br />
			</span></span></p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Define a corresponding servlet for this exporter in </span><span style="color:#0070c0;">&#8216;web.xml&#8217;; </span><span style="color:black;">The exporter getting mapped to the request path /remoting/AccountService. Note that the servlet name needs to match the bean name of the target exporter.<br />
</span></span></p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;servlet&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="font-family:Arial;"><span style="color:black;">    &lt;servlet-name&gt;</span><span style="color:#0070c0;">accountExporter</span><span style="color:black;">&lt;/servlet-name&gt;
</span></span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;servlet-class&gt;org.springframework.web.context.support.HttpRequestHandlerServlet&lt;/servlet-class&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;/servlet&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
 </p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;servlet-mapping&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;servlet-name&gt;accountExporter&lt;/servlet-name&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;url-pattern&gt;/remoting/AccountService&lt;/url-pattern&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;/servlet-mapping&gt;
</span></code></pre>
</p>
<p>
 </p>
<p><span style="color:black;font-family:Arial;font-size:10pt;">Create a HessianServiceExporter in your root application context (e.g. in &#8217;WEB-INF/applicationContext.xml&#8217;):<br />
</span></p>
<p style="background:#d9d9d9;">
<pre><code><span style="font-family:Arial;"><span style="color:black;">&lt;bean name="</span><span style="color:#0070c0;">accountExporter</span><span style="color:black;">" class="org.springframework.remoting.caucho.</span><span style="color:#0070c0;"><strong>HessianServiceExporter</strong></span><span style="color:black;">"&gt;
</span></span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;property name="service" ref="accountService"/&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;property name="serviceInterface" value="example.AccountService"/&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;/bean&gt;
</span></code></pre>
</p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Can be accessed using </span><span style="color:#0070c0;">&#8216;http://HOST:8080/remoting/AccountService&#8217;<br />
</span></span></p>
<p><span style="color:black;font-family:Arial;font-size:10pt;"><strong>Linking in the service on the client<br />
</strong></span></p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;font-size:10pt;">&lt;bean class="example.SimpleObject"&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;font-size:10pt;">    &lt;property name="accountService" ref="accountService"/&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;font-size:10pt;">&lt;/bean&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
 </p>
<p style="background:#d9d9d9;">
<pre><code><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">&lt;bean id="accountService" class="org.springframework.remoting.caucho.</span><span style="color:#0070c0;"><strong>HessianProxyFactoryBean</strong></span><span style="color:black;">"&gt;
</span></span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">    &lt;property name="serviceUrl" value="</span><span style="color:#0070c0;">http://remotehost:8080/remoting/AccountService</span><span style="color:black;">"/&gt;
</span></span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;font-size:10pt;">    &lt;property name="serviceInterface" value="example.AccountService"/&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;font-size:10pt;">&lt;/bean&gt;
</span></code></pre>
</p>
<p>
 </p>
<p><span style="font-family:Arial;font-size:10pt;"><strong>Applying HTTP basic authentication to a service exposed through Hessian or Burlap<br />
</strong></span></p>
<p><span style="font-family:Arial;"><span style="font-size:10pt;"><span style="color:black;">One of the advantages of Hessian and Burlap is that we can easily apply </span><span style="color:#0070c0;">HTTP basic authentication</span><span style="color:black;">, because both protocols are HTTP-based. Your normal HTTP server security mechanism can easily be applied through using the </span></span><span style="color:#0070c0;font-size:12pt;">web.xml</span><span style="color:black;font-size:10pt;"> security features<br />
</span></span></p>
<p>
 </p>
<ol>
<li><span style="color:black;font-family:Arial;font-size:12pt;"><strong>Using HTTP invokers<br />
</strong></span></li>
</ol>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Spring Http invokers use the <span style="text-decoration:underline;">standard Java serialization mechanism</span> to expose </span><span style="color:#0070c0;">services through HTTP</span><span style="color:black;"><br />
			</span></span></p>
<p><span style="font-family:Arial;font-size:10pt;">The HTTP invoker is a new remoting model created as part of the Spring Framework to perform <span style="color:#0070c0;">remoting across HTTP</span> and <span style="color:#0070c0;">using Java&#8217;s serialization</span>.<br />
</span></p>
<p>
 </p>
<p><span style="color:black;font-family:Arial;font-size:10pt;">To expose the AccountService (mentioned above) within a Spring Web MVC DispatcherServlet, the following configuration needs to be in place in the dispatcher&#8217;s application context:<br />
</span></p>
<p style="background:#d9d9d9;">
<pre><code><span style="font-family:Arial;"><span style="color:black;">&lt;bean name="/AccountService" class="org.springframework.remoting.httpinvoker.</span><span style="color:#0070c0;"><strong>HttpInvokerServiceExporter</strong></span><span style="color:black;">"&gt;
</span></span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;property name="service" ref="accountService"/&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;property name="serviceInterface" value="example.AccountService"/&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;/bean&gt;
</span></code></pre>
</p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Such an exporter definition will be exposed through the </span><span style="color:#0070c0;">DispatcherServlet&#8217;s</span><span style="color:black;"> standard mapping facilities, as explained in the section on Hessian.<br />
</span></span></p>
<p>
 </p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;"><strong>Alternatively</strong>, create an </span><span style="color:#0070c0;">HttpInvokerServiceExporter</span><span style="color:black;"> in your root application context (e.g. in &#8217;WEB-INF/applicationContext.xml&#8217;):<br />
</span></span></p>
<p style="background:#d9d9d9;">
<pre><code><span style="font-family:Arial;"><span style="color:black;">&lt;bean name="accountExporter" class="org.springframework.remoting.httpinvoker.</span><span style="color:#0070c0;"><strong>HttpInvokerServiceExporter</strong></span><span style="color:black;">"&gt;
</span></span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;property name="service" ref="accountService"/&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">    &lt;property name="serviceInterface" value="example.AccountService"/&gt;
</span></code></pre>
</p>
<p style="background:#d9d9d9;">
<pre><code><span style="color:black;font-family:Arial;">&lt;/bean&gt;
</span></code></pre>
</p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Define a corresponding servlet for this exporter in </span><span style="color:#0070c0;">&#8216;web.xml&#8217;</span><span style="color:black;">, with the servlet name matching the bean name of the target exporter:<br />
</span></span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">&lt;servlet&gt;<br />
</span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">    &lt;servlet-name&gt;accountExporter&lt;/servlet-name&gt;<br />
</span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">    &lt;servlet-class&gt;org.springframework.web.context.support.HttpRequestHandlerServlet&lt;/servlet-class&gt;<br />
</span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">&lt;/servlet&gt;<br />
</span></p>
<p style="background:#d9d9d9;">
 </p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">&lt;servlet-mapping&gt;<br />
</span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">    &lt;servlet-name&gt;accountExporter&lt;/servlet-name&gt;<br />
</span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">    &lt;url-pattern&gt;/remoting/AccountService&lt;/url-pattern&gt;<br />
</span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">&lt;/servlet-mapping&gt;<br />
</span></p>
<p>
 </p>
<p><span style="color:black;font-family:Arial;font-size:10pt;"><strong>Linking in the service at the client<br />
</strong></span></p>
<p><span style="color:black;font-family:Arial;font-size:10pt;">Linking in the service from the client much resembles the way you would do it when using Hessian or Burlap. Using a proxy, spring will be able to translate your calls to HTTP POST requests to the URL pointing to the exported service.<br />
</span></p>
<p style="background:#d9d9d9;"><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">&lt;bean id=&#8221;httpInvokerProxy&#8221; class=&#8221;org.springframework.remoting.httpinvoker.</span><span style="color:#0070c0;"><strong>HttpInvokerProxyFactoryBean</strong></span><span style="color:black;">&#8220;&gt;<br />
</span></span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">    &lt;property name=&#8221;serviceUrl&#8221; value=&#8221;http://remotehost:8080/remoting/AccountService&#8221;/&gt;<br />
</span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">    &lt;property name=&#8221;serviceInterface&#8221; value=&#8221;example.AccountService&#8221;/&gt;<br />
</span></p>
<p style="background:#d9d9d9;"><span style="color:black;font-family:Arial;font-size:10pt;">&lt;/bean&gt;<br />
</span></p>
<p>
 </p>
<p><span style="font-family:Arial;font-size:10pt;"><span style="color:black;">Spring&#8217;s HTTP invoker presents a best-of-both-worlds remoting solution combining the simplicity of </span><span style="color:#0070c0;">HTTP</span><span style="color:black;"> communication with </span><span style="color:#0070c0;">Java&#8217;s built-in object serialization.</span><span style="color:black;"> This makes HTTP invoker services an appealing alternative to either RMI or Hessian/Burlap.</span></span><br />
		<span style="font-family:Arial;font-size:10pt;"><span style="color:black;">it is a </span><span style="color:#0070c0;text-decoration:underline;">remoting solution offered by the Spring Framework only</span><span style="color:black;"><span style="text-decoration:underline;">. </span>This means that </span><span style="color:#0070c0;">both the client and the service must be Spring-enabled applications</span><span style="color:black;">. This also implies, at least for now, that </span><span style="color:#0070c0;text-decoration:underline;">both the client and the service must be Java based</span><span style="color:black;">. And because Java serialization is being used, </span><span style="color:#0070c0;"><span style="text-decoration:underline;">both sides must have the same version of the classes</span><br />
			</span><span style="color:black;">(much like RMI).<br />
</span></span></p>
<p style="background:#d9d9d9;"><span style="font-family:Verdana;font-size:10pt;"><span style="color:black;"><strong>RMI:</strong> When using RMI, it&#8217;s not possible to access the objects through the HTTP protocol, unless you&#8217;re tunneling the RMI traffic. RMI is a fairly heavy-weight protocol in that it support full-object serialization which is important when using a complex data model that needs serialization over the wire. However, RMI-JRMP is tied to Java clients: </span><span style="color:#0070c0;">It is a Java-to-Java remoting solution</span><span style="color:black;">.<br />
</span></span></p>
<p style="background:#d9d9d9;"><span style="font-family:Verdana;font-size:10pt;"><span style="color:black;"><strong>HTTP Invoker:</strong> Spring&#8217;s HTTP invoker is a good choice if you need </span><span style="color:#0070c0;">HTTP-based remoting</span><span style="color:black;"> but also rely on Java serialization. It shares the basic infrastructure with RMI invokers, just using HTTP as transport. Note that HTTP invokers are not only limited to </span><span style="color:#0070c0;"><span style="text-decoration:underline;">Java-to-Java remoting but also to Spring on both the client and server side</span>.</span><span style="color:black;"> (The latter also applies to Spring&#8217;s RMI invoker for non-RMI interfaces.)<br />
</span></span></p>
<p style="background:#d9d9d9;"><span style="font-family:Verdana;font-size:10pt;"><span style="color:black;"><strong>Hessian and/or Burlap</strong> might provide significant value when operating in a heterogeneous environment, because they explicitly </span><span style="color:#0070c0;">allow for non-Java clients</span><span style="color:black;">. However, non-Java support is still limited. Known issues include the serialization of Hibernate objects in combination with lazily-initialized collections. If you have such a data model, consider using RMI or HTTP invokers instead of Hessian.<br />
</span></span></p>
<p style="background:#d9d9d9;"><span style="font-family:Verdana;font-size:10pt;"><span style="color:black;"><strong>JMS</strong> can be useful for providing </span><span style="color:#0070c0;">clusters of services</span><span style="color:black;"> and allowing the JMS broker to take care of </span><span style="color:#0070c0;">load balancing</span><span style="color:black;">, </span><span style="color:#0070c0;">discovery</span><span style="color:black;"> and </span><span style="color:#0070c0;">auto-failover</span><span style="color:black;">. By default: </span><span style="color:#0070c0;">Java serialization is used when using JMS remoting</span><span style="color:black;"> but the JMS provider could use a different mechanism for the wire formatting, such as XStream to allow servers to be implemented in other technologies.<br />
</span></span></p>
<p style="background:#d9d9d9;"><span style="font-family:Verdana;font-size:10pt;"><span style="color:black;"><strong>EJB</strong> has an advantage over RMI in that it </span><span style="color:#0070c0;">supports standard role-based authentication and authorization and remote transaction propagation</span><span style="color:black;">. It is possible to get RMI invokers or HTTP invokers to support security context propagation as well, although this is not provided by core Spring: There are just appropriate hooks for plugging in third-party or custom solutions here.<br />
</span></span></p>
<p>
 </p>
<p><span style="color:black;font-family:Arial;font-size:10pt;"><strong>Spring RMI</strong>: </span><span style="font-family:Times New Roman;font-size:10pt;">the service interface doesn&#8217;t extend </span><span style="font-family:Courier New;font-size:10pt;"><span style="color:#0070c0;">java.rmi.Remote</span><br />
		</span><span style="font-family:Times New Roman;font-size:10pt;">and none of its methods throw </span><span style="color:#0070c0;font-family:Courier New;font-size:10pt;">java.rmi.RemoteException</span><span style="font-family:Times New Roman;font-size:10pt;">, this trims the interface down a bit. But more importantly, a client accessing the service through <span style="color:#0070c0;">this interface will not have to catch exceptions</span> that they probably won&#8217;t be able to deal with.<br />
</span></p>
<p><span style="font-family:Times New Roman;font-size:10pt;">We have no need to implement </span><span style="font-family:Courier New;font-size:10pt;">java.rmi.Remote </span><span style="font-family:Times New Roman;font-size:10pt;">and no more </span><span style="font-family:Courier New;font-size:10pt;">java.rmi.RemoteException</span><span style="font-family:Times New Roman;font-size:10pt;">s are being thrown around.<br />
</span></p>
<p><span style="font-family:Times New Roman;font-size:10pt;">For using this service remotely, we&#8217;ll use Spring&#8217;s </span><span style="color:#0070c0;font-family:Courier New;font-size:10pt;">RmiServiceExporter<br />
</span></p>
<p>
 </p>
<p><span style="font-family:Courier New;font-size:10pt;"><strong>RmiServiceExporter</strong><br />
		</span><span style="font-family:Times New Roman;"><span style="font-size:10pt;">exports any <span style="color:#0070c0;">Spring-managed bean</span> as an </span><span style="color:#0070c0;"><span style="font-size:9pt;">RMI </span><span style="font-size:10pt;">service; </span></span></span><span style="font-family:Courier New;font-size:10pt;">RmiServiceExporter </span><span style="font-family:Times New Roman;font-size:10pt;">works by wrapping the bean in an adapter class.<br />
</span></p>
<p><span style="color:#0070c0;font-family:Times New Roman;"><span style="font-size:9pt;">RMI </span><span style="font-size:10pt;">has difficulty working across firewalls.<br />
</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:9pt;">RMI </span><span style="font-size:10pt;">is Java based so both the client and the service must be written in Java.<br />
</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:9pt;">RMI </span><span style="font-size:10pt;">uses <span style="color:#0070c0;">Java serialization</span>.<br />
</span></span></p>
<p><span style="font-family:Times New Roman;font-size:10pt;">The types of the objects being sent across the network must have the exact same version on both sides of the call.<br />
</span></p>
<p>
 </p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;"><strong>Hessian and Burlap</strong> that enable lightweight remote services over </span><span style="font-size:9pt;">HTTP.<br />
</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">Hessian, like </span><span style="font-size:9pt;">RMI</span><span style="font-size:10pt;">, uses binary messages to communicate between client and service.<br />
</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">Burlap, on the other hand, is an </span><span style="font-size:9pt;">XML</span><span style="font-size:10pt;">-based remoting technology,<br />
</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">The only difference is that <span style="color:#0070c0;">Hessian</span> messages are <span style="color:#0070c0;">binary</span> and <span style="color:#0070c0;">Burlap</span> messages are </span><span style="font-size:9pt;"><span style="color:#0070c0;">XML</span><br />
			</span></span></p>
<p>
 </p>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:#0070c0;">HessianServiceExporter</span><br />
		</span><span style="font-family:Times New Roman;"><span style="font-size:10pt;">is a <span style="color:#0070c0;">Spring </span></span><span style="font-size:9pt;">MVC </span><span style="font-size:10pt;"><span style="color:#0070c0;">controller</span>.<br />
</span></span></p>
<p>
 </p>
<p>
 </p>
<p><span style="font-family:Times New Roman;"><span style="font-size:9pt;">RMI </span><span style="font-size:10pt;">uses Java&#8217;s standard object serialization but is difficult to use across firewalls. On the other side, Hessian/Burlap work well across firewalls but use a proprietary object serialization mechanism.<br />
</span></span></p>
<p>
 </p>
<p><span style="font-family:Times New Roman;"><span style="font-size:9pt;"><strong>HTTP </strong></span><span style="font-size:10pt;"><strong>invoker</strong> perform remoting across </span><span style="font-size:9pt;"><span style="color:#0070c0;">HTTP</span><br />
			</span><span style="font-size:10pt;">and using <span style="color:#0070c0;">Java&#8217;s serialization<br />
</span></span></span></p>
<p>
 </p>
<p>
 </p>
<p>
 </p>
<p>
 </p>
<p>
 </p>
<p><span style="font-family:Times New Roman;font-size:10pt;"><br />
		</span> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/j2eeroad.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/j2eeroad.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/j2eeroad.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/j2eeroad.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/j2eeroad.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/j2eeroad.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/j2eeroad.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/j2eeroad.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/j2eeroad.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/j2eeroad.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/j2eeroad.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/j2eeroad.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/j2eeroad.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/j2eeroad.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=44&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://j2eeroad.wordpress.com/2010/01/20/spring-remoting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd5abecd8dc2194f6a4237bc12753da2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">seeazee</media:title>
		</media:content>
	</item>
		<item>
		<title>JBOSS: Deploying data sources</title>
		<link>http://j2eeroad.wordpress.com/2009/12/19/jboss-deploying-data-sources/</link>
		<comments>http://j2eeroad.wordpress.com/2009/12/19/jboss-deploying-data-sources/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 12:04:37 +0000</pubDate>
		<dc:creator>Abdul Aziz</dc:creator>
				<category><![CDATA[Application Server]]></category>
		<category><![CDATA[JBOSS]]></category>

		<guid isPermaLink="false">http://j2eeroad.wordpress.com/2010/01/18/jboss-deploying-data-sources/</guid>
		<description><![CDATA[Let application server manage your database connections using a data source. The application server can then manage the database connections by pooling them and by providing connections to the application when it needs them.   Deploy, a *-ds.xml file. You can use any name for the file that you like, as long at the suffix [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=39&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Let <strong>application server</strong><br />
		<span style="color:#0070c0;">manage</span> your <strong>database connections</strong> using a <strong>data source</strong>. The application server can then manage the database connections <strong>by pooling</strong> them and by providing connections to the application when it needs them.
</p>
<p>
 </p>
<p><strong>Deploy, a *-ds.xml file</strong>. You can use any name for the file that you like, as long at the suffix is –ds.xml.
</p>
<p>
 </p>
<p><span style="font-family:Times New Roman;font-size:10pt;">The </span><span style="font-family:Courier New;font-size:9pt;"><strong>&lt;local-tx-datasource&gt;</strong><br />
		</span><span style="font-family:Times New Roman;font-size:10pt;">tag defines a particular type of data source that handles local transactions. Three different data source types are available, each of which handles transactions differently.<br />
</span></p>
<p>
 </p>
<p><strong>&lt;local-tx-datasource&gt; </strong>: Identifies a data source that uses transactions, even distributed transactions within the local application server, but doesn&#8217;t use distributed transactions among multiple application servers.
</p>
<p>
 </p>
<p><strong>&lt;xa-datasource&gt;:</strong><br />
		<span style="text-decoration:underline;">Identifies a data source that uses distributed transaction among multiple application servers</span>. This option isn&#8217;t shown in the example, but would appear in place of the &lt;local-tx-datasource&gt; tag.
</p>
<p>
 </p>
<p><strong>&lt;no-tx-datasource&gt;:</strong>  Identifies a data source that doesn&#8217;t use transactions.
</p>
<p>
 </p>
<p><span style="font-family:Times New Roman;font-size:10pt;">In most cases, you&#8217;ll use </span><span style="font-family:Courier New;font-size:9pt;"><span style="color:#0070c0;"><strong>&lt;local-tx-datasource&gt;</strong></span><br />
		</span><span style="font-family:Times New Roman;font-size:10pt;">because it handles transactions within a single application server. If you&#8217;re <span style="text-decoration:underline;"><strong>clustering your application servers</strong></span> or wanting to use <span style="text-decoration:underline;">distributed transactions among multiple application servers</span>, then you should use </span><span style="color:#0070c0;"><strong><span style="font-family:Courier New;font-size:9pt;">&lt;xa-datasource&gt;</span><span style="font-family:Times New Roman;font-size:10pt;">.<br />
</span></strong></span></p>
<p>
 </p>
<p><span style="font-family:Times New Roman;font-size:10pt;"> Note that both </span><span style="font-family:Courier New;font-size:9pt;"><strong>&lt;local-tx-datasource&gt;</strong><br />
		</span><span style="font-family:Times New Roman;font-size:10pt;">and </span><span style="font-family:Courier New;font-size:9pt;"><strong>&lt;xa-datasource&gt; </strong></span><span style="font-family:Times New Roman;font-size:10pt;">handle distributed transactions involving <strong>multiple data sources</strong>.<br />
</span></p>
<p>
 </p>
<p><span style="font-family:Times New Roman;font-size:10pt;">The difference is that </span><span style="font-family:Courier New;font-size:9pt;">&lt;local-tx-datasource&gt; </span><span style="font-family:Times New Roman;font-size:10pt;">handles them only within a single running application server, whereas </span><span style="font-family:Courier New;font-size:9pt;">&lt;xa-datasource&gt; </span><span style="font-family:Times New Roman;font-size:10pt;">handles them among many running application servers.<br />
</span></p>
<p>
 </p>
<p><span style="font-family:Times New Roman;font-size:10pt;"> On the other end of the spectrum, if your applications only read from the database,<br />
</span></p>
<p><span style="font-family:Times New Roman;font-size:10pt;">Then using </span><span style="font-family:Courier New;font-size:9pt;"><span style="color:#0070c0;"><strong>&lt;no-tx-datasource&gt;</strong></span><br />
		</span><span style="font-family:Times New Roman;font-size:10pt;">would be appropriate.<br />
</span></p>
<p>
 </p>
<p><strong>&lt;jndi-name&gt;</strong> : Name used to look up the data source in the JNDI namespace. The java: prefix is automatically added to this name.
</p>
<p>
 </p>
<p>&lt;min-pool-size&gt;
</p>
<p>&lt;max-pool-size&gt;
</p>
<p>&lt;idle-timeout-minutes&gt;
</p>
<p>&lt;blocking-timeout-millis&gt;
</p>
<p>&lt;exception-sorter-class-name&gt;
</p>
<p>&lt;check-valid-connection-sql&gt;
</p>
<p>&lt;transaction-isolation&gt;
</p>
<p>
 </p>
<p>You can define multiple data sources within a single *-ds.xml file
</p>
<p>
 </p>
<p><span style="color:#0070c0;">The *-ds.xml file goes into the deploy directory</span>. Yes, that&#8217;s right; it&#8217;s treated as an application, specifically as a service. Second, you <span style="text-decoration:underline;">must provide the JAR file for the JDBC driver for the database</span>. Place the driver JAR file in the server/xxx/lib directory.
</p>
<p>
 </p>
<p>Once the data source is deployed, the application server creates several MBeans for the data source
</p>
<p>
 </p>
<p><span style="color:#0070c0;">You can also place the <strong>*-ds.xml</strong> file in the <strong>EAR</strong> file<br />
</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/j2eeroad.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/j2eeroad.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/j2eeroad.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/j2eeroad.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/j2eeroad.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/j2eeroad.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/j2eeroad.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/j2eeroad.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/j2eeroad.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/j2eeroad.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/j2eeroad.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/j2eeroad.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/j2eeroad.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/j2eeroad.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=39&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://j2eeroad.wordpress.com/2009/12/19/jboss-deploying-data-sources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd5abecd8dc2194f6a4237bc12753da2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">seeazee</media:title>
		</media:content>
	</item>
		<item>
		<title>Data Source configuration for JBOSS</title>
		<link>http://j2eeroad.wordpress.com/2009/11/03/data-source-configuration-for-jboss/</link>
		<comments>http://j2eeroad.wordpress.com/2009/11/03/data-source-configuration-for-jboss/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 11:50:25 +0000</pubDate>
		<dc:creator>Abdul Aziz</dc:creator>
				<category><![CDATA[Implementing-Enterprise-Information-Connectivity]]></category>
		<category><![CDATA[JBOSS]]></category>

		<guid isPermaLink="false">http://j2eeroad.wordpress.com/2010/01/18/data-source-configuration-for-jboss/</guid>
		<description><![CDATA[Data Source configuration for JBOSS In web.xml (\WEB-INF\web.xml) add the following &#60;resource-ref&#62; &#60;description&#62; Resource reference to a factory for java.sql.Connection instances that may be used for talking to the database that is configured in server.xml in TOMCAT. For JBOSS- jboss-web.xml and *-ds.xml &#60;/description&#62; &#60;res-ref-name&#62;jdbc/SampleDB&#60;/res-ref-name&#62; &#60;res-type&#62;javax.sql.DataSource&#60;/res-type&#62; &#60;res-auth&#62;Container&#60;/res-auth&#62; &#60;/resource-ref&#62; In jboss-web.xml (\WEB-INF\ jboss-web.xml) add the following &#60;resource-ref&#62; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=21&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:14pt;"><strong>Data Source configuration for JBOSS<br />
</strong></span></p>
<ol>
<li>In <strong>web.xml</strong> (\WEB-INF\web.xml) add the following
</li>
</ol>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:teal;">&lt;</span><span style="color:#3f7f7f;">resource-ref</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;"><br />
			</span><span style="color:teal;">&lt;</span><span style="color:#3f7f7f;">description</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;">      Resource reference to a factory for java.sql.Connection</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;">      instances that may be used for talking to the database</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;">      that is configured in server.xml in <strong>TOMCAT</strong>.</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;">      For <strong>JBOSS</strong>- jboss-web.xml and *-ds.xml</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;"><br />
			</span><span style="color:teal;">&lt;/</span><span style="color:#3f7f7f;">description</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;"><br />
			</span><span style="color:teal;">&lt;</span><span style="color:#3f7f7f;">res-ref-name</span><span style="color:teal;">&gt;</span><span style="color:#00b050;"><strong>jdbc/SampleDB</strong></span><span style="color:teal;">&lt;/</span><span style="color:#3f7f7f;">res-ref-name</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;"><br />
			</span><span style="color:teal;">&lt;</span><span style="color:#3f7f7f;">res-type</span><span style="color:teal;">&gt;</span><span style="color:black;">javax.sql.DataSource</span><span style="color:teal;">&lt;/</span><span style="color:#3f7f7f;">res-type</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;"><br />
			</span><span style="color:teal;">&lt;</span><span style="color:#3f7f7f;">res-auth</span><span style="color:teal;">&gt;</span><span style="color:black;">Container</span><span style="color:teal;">&lt;/</span><span style="color:#3f7f7f;">res-auth</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;"><br />
			</span><span style="color:teal;">&lt;/</span><span style="color:#3f7f7f;">resource-ref</span><span style="color:teal;">&gt;<br />
</span></span></p>
<ol>
<li>In <strong>jboss-web.xml</strong> (\WEB-INF\ jboss-web.xml) add the following
</li>
</ol>
<p><span style="font-family:Courier New;font-size:10pt;"><span style="color:teal;">&lt;</span><span style="color:#3f7f7f;">resource-ref</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;"><br />
			</span><span style="color:teal;">&lt;</span><span style="color:#3f7f7f;">res-ref-name</span><span style="color:teal;">&gt;</span><span style="color:#00b050;"><strong>jdbc/SampleDB</strong></span><span style="color:teal;">&lt;/</span><span style="color:#3f7f7f;">res-ref-name</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;"><br />
			</span><span style="color:teal;">&lt;</span><span style="color:#3f7f7f;">jndi-name</span><span style="color:teal;">&gt;</span><span style="color:black;">java:/</span><span style="color:#c00000;"><strong>jdbc/SampleDS</strong></span><span style="color:teal;">&lt;/</span><span style="color:#3f7f7f;">jndi-name</span><span style="color:teal;">&gt;</span><br />
		</span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:black;"><br />
			</span><span style="color:teal;">&lt;/</span><span style="color:#3f7f7f;">resource-ref</span><span style="color:teal;">&gt;<br />
</span></span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;"><span style="color:teal;">(</span><span style="color:#3f7f7f;">res-ref-name in web.xml and jboss-web.xml should be the same</span><span style="color:teal;">)<br />
</span></span></p>
<p style="margin-left:18pt;"><span style="font-family:Courier New;font-size:10pt;">(<strong>jdbc/SampleDS should match with jndi in *-ds.xml</strong>)<br />
</span></p>
<ol>
<li>
<div>Add the following <strong>msssql-ds.xml (</strong>at server\default\deploy)
</div>
<p>&lt;datasources&gt;
</p>
<p>  &lt;local-tx-datasource&gt;
</p>
<p>  &lt;jndi-name&gt;<span style="color:#c00000;"><strong>jdbc/SampleDS</strong></span>&lt;/jndi-name&gt;
</p>
<p>  &lt;connection-url&gt;jdbc:jtds:sqlserver://localhost:1433/sampleDB&lt;/connection-url&gt;
</p>
<p>  &lt;driver-class&gt;net.sourceforge.jtds.jdbc.Driver&lt;/driver-class&gt;
</p>
<p>  &lt;user-name&gt;sa&lt;/user-name&gt;
</p>
<p>  &lt;password&gt;dev123456&lt;/password&gt;
</p>
<p>  &lt;check-valid-connection-sql&gt;SELECT 1 FROM sysobjects&lt;/check-valid-connection-sql&gt;
</p>
<p>  &lt;metadata&gt;
</p>
<p>      &lt;type-mapping&gt;MS SQLSERVER2005&lt;/type-mapping&gt;
</p>
<p>  &lt;/metadata&gt;
</p>
<p>  &lt;/local-tx-datasource&gt;
</p>
<p>&lt;/datasources&gt;
</p>
</li>
<li>Add the required jar files in <strong>\server\default\lib</strong> FOLDER
</li>
</ol>
<p><span style="color:#0070c0;">Cheers!</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/j2eeroad.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/j2eeroad.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/j2eeroad.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/j2eeroad.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/j2eeroad.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/j2eeroad.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/j2eeroad.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/j2eeroad.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/j2eeroad.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/j2eeroad.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/j2eeroad.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/j2eeroad.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/j2eeroad.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/j2eeroad.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=21&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://j2eeroad.wordpress.com/2009/11/03/data-source-configuration-for-jboss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd5abecd8dc2194f6a4237bc12753da2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">seeazee</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring: AOP</title>
		<link>http://j2eeroad.wordpress.com/2009/10/26/spring-aop-2/</link>
		<comments>http://j2eeroad.wordpress.com/2009/10/26/spring-aop-2/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 11:02:47 +0000</pubDate>
		<dc:creator>Abdul Aziz</dc:creator>
				<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AOP]]></category>
		<category><![CDATA[DAO]]></category>
		<category><![CDATA[ORM]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Spring MVC]]></category>
		<category><![CDATA[Transaction Management (TM)]]></category>

		<guid isPermaLink="false">http://j2eeroad.wordpress.com/2010/01/25/spring-aop-2/</guid>
		<description><![CDATA[Aspects are often described in terms of advice, pointcuts, and joinpoints. Advice: the job of an aspect is called advice; Advice defines both what and the when of an aspect describing the job that an aspect will perform, advice addresses the question of when to perform the job. Before a method or after the method [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=51&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Aspects are often described in terms of <span style="color:#4f81bd;"><strong>advice</strong>, <strong>pointcuts</strong>, and <strong>joinpoints</strong>.</span>
	</p>
<p><span style="font-family:Arial;font-size:10pt;"><strong>Advice: </strong>the job of an aspect is called <em>advice</em>; Advice defines both <em>what</em> and the <em>when</em> of an aspect describing the job that an aspect will perform, advice addresses the question of when to perform the job. Before a method or after the method is invoked.<br />
</span></p>
<p><span style="font-family:Arial;font-size:10pt;"><strong>Joinpoint: </strong>A joinpoint is a point in the execution of the application where an aspect can be plugged in. This point could be a <span style="text-decoration:underline;"><em>method</em> being called</span>, an <span style="text-decoration:underline;"><em>exception</em></span> being thrown, or even a <span style="text-decoration:underline;"><em>field</em> being modified</span>. These are the points where your aspect&#8217;s code can be inserted into the normal flow of your application to add new behavior.<br />
</span></p>
<p><span style="font-family:Arial;font-size:10pt;"><strong>Pointcut</strong>: pointcuts define the where. A pointcut definition matches one or more joinpoints at which advice should be woven<br />
</span></p>
<p><span style="font-family:Arial;font-size:10pt;"><strong>Aspect: </strong>An aspect is the merger of <strong>advice</strong> and <strong>pointcuts</strong><br />
		</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/j2eeroad.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/j2eeroad.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/j2eeroad.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/j2eeroad.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/j2eeroad.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/j2eeroad.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/j2eeroad.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/j2eeroad.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/j2eeroad.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/j2eeroad.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/j2eeroad.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/j2eeroad.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/j2eeroad.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/j2eeroad.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=j2eeroad.wordpress.com&amp;blog=11472938&amp;post=51&amp;subd=j2eeroad&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://j2eeroad.wordpress.com/2009/10/26/spring-aop-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd5abecd8dc2194f6a4237bc12753da2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">seeazee</media:title>
		</media:content>
	</item>
	</channel>
</rss>
