<?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>Suresh Mandalapu&#039;s JEE blog</title>
	<atom:link href="http://sureshjava.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sureshjava.wordpress.com</link>
	<description>A blog about Java Enterprise Edition</description>
	<lastBuildDate>Sun, 13 Feb 2011 18:16:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='sureshjava.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Suresh Mandalapu&#039;s JEE blog</title>
		<link>http://sureshjava.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://sureshjava.wordpress.com/osd.xml" title="Suresh Mandalapu&#039;s JEE blog" />
	<atom:link rel='hub' href='http://sureshjava.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Java EE 6 is Released Today!!</title>
		<link>http://sureshjava.wordpress.com/2009/12/10/java-ee-6-is-released-today/</link>
		<comments>http://sureshjava.wordpress.com/2009/12/10/java-ee-6-is-released-today/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 14:53:55 +0000</pubDate>
		<dc:creator>sureshmandalapu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[java ee 6]]></category>

		<guid isPermaLink="false">http://sureshjava.wordpress.com/?p=106</guid>
		<description><![CDATA[available for download : http://java.sun.com/javaee/technologies/javaee6.jsp Thanks Suresh<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=106&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>available for download :</p>
<p><a href="http://java.sun.com/javaee/technologies/javaee6.jsp" target="_blank">http://java.sun.com/javaee/technologies/javaee6.jsp</a></p>
<p>Thanks</p>
<p>Suresh</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sureshjava.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sureshjava.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sureshjava.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sureshjava.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sureshjava.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sureshjava.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sureshjava.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sureshjava.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sureshjava.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sureshjava.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sureshjava.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sureshjava.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sureshjava.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sureshjava.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=106&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sureshjava.wordpress.com/2009/12/10/java-ee-6-is-released-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>12.959558 77.646360</georss:point>
		<geo:lat>12.959558</geo:lat>
		<geo:long>77.646360</geo:long>
		<media:content url="http://1.gravatar.com/avatar/96a08f729b114b3830c9e7db2a2ffc71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sureshmandalapu</media:title>
		</media:content>
	</item>
		<item>
		<title>Java Messenging Service(JMS) – Part-3</title>
		<link>http://sureshjava.wordpress.com/2009/12/10/java-messenging-servicejms-%e2%80%93-part-3/</link>
		<comments>http://sureshjava.wordpress.com/2009/12/10/java-messenging-servicejms-%e2%80%93-part-3/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 10:16:45 +0000</pubDate>
		<dc:creator>sureshmandalapu</dc:creator>
				<category><![CDATA[JMS]]></category>
		<category><![CDATA[messenging]]></category>

		<guid isPermaLink="false">http://sureshjava.wordpress.com/?p=104</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=104&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=104&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sureshjava.wordpress.com/2009/12/10/java-messenging-servicejms-%e2%80%93-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>12.959558 77.646360</georss:point>
		<geo:lat>12.959558</geo:lat>
		<geo:long>77.646360</geo:long>
		<media:content url="http://1.gravatar.com/avatar/96a08f729b114b3830c9e7db2a2ffc71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sureshmandalapu</media:title>
		</media:content>
	</item>
		<item>
		<title>Java Messenging Service(JMS) – Part-2</title>
		<link>http://sureshjava.wordpress.com/2009/12/10/java-messenging-servicejms-%e2%80%93-part-2/</link>
		<comments>http://sureshjava.wordpress.com/2009/12/10/java-messenging-servicejms-%e2%80%93-part-2/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 04:58:08 +0000</pubDate>
		<dc:creator>sureshmandalapu</dc:creator>
				<category><![CDATA[JMS]]></category>
		<category><![CDATA[messenging]]></category>

		<guid isPermaLink="false">http://sureshjava.wordpress.com/?p=97</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=97&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=97&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sureshjava.wordpress.com/2009/12/10/java-messenging-servicejms-%e2%80%93-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>12.959558 77.646360</georss:point>
		<geo:lat>12.959558</geo:lat>
		<geo:long>77.646360</geo:long>
		<media:content url="http://1.gravatar.com/avatar/96a08f729b114b3830c9e7db2a2ffc71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sureshmandalapu</media:title>
		</media:content>
	</item>
		<item>
		<title>The Bridge Pattern</title>
		<link>http://sureshjava.wordpress.com/2009/12/08/the-bridge-pattern/</link>
		<comments>http://sureshjava.wordpress.com/2009/12/08/the-bridge-pattern/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 17:28:02 +0000</pubDate>
		<dc:creator>sureshmandalapu</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bridge pattern]]></category>
		<category><![CDATA[Design Patterns]]></category>

		<guid isPermaLink="false">http://sureshjava.wordpress.com/?p=94</guid>
		<description><![CDATA[This comes under Structural  Pattern . Also known as  Handle/Body pattern . This pattern is used to decouple(separate) the abstractions(base classes or interfaces) from their implementations so that we can vary  not only implementations but their abstractions,  independently , one from another.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=94&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This comes under Structural  Pattern .</p>
<p>Also known as  Handle/Body pattern .</p>
<p>This pattern is used to decouple(separate) the abstractions(base classes or interfaces) from their implementations so that we can vary  not only implementations but their abstractions,  independently , one from another.</p>
<p><img src="/Users/suresh/AppData/Local/Temp/moz-screenshot-2.png" alt="" /><img src="/Users/suresh/AppData/Local/Temp/moz-screenshot-1.png" alt="" /><img src="/Users/suresh/AppData/Local/Temp/moz-screenshot.png" alt="" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sureshjava.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sureshjava.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sureshjava.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sureshjava.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sureshjava.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sureshjava.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sureshjava.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sureshjava.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sureshjava.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sureshjava.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sureshjava.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sureshjava.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sureshjava.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sureshjava.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=94&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sureshjava.wordpress.com/2009/12/08/the-bridge-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>12.959558 77.646360</georss:point>
		<geo:lat>12.959558</geo:lat>
		<geo:long>77.646360</geo:long>
		<media:content url="http://1.gravatar.com/avatar/96a08f729b114b3830c9e7db2a2ffc71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sureshmandalapu</media:title>
		</media:content>
	</item>
		<item>
		<title>Java Messenging Service(JMS) &#8211; Part-1</title>
		<link>http://sureshjava.wordpress.com/2009/12/06/java-messenging-service-part-1/</link>
		<comments>http://sureshjava.wordpress.com/2009/12/06/java-messenging-service-part-1/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 11:32:38 +0000</pubDate>
		<dc:creator>sureshmandalapu</dc:creator>
				<category><![CDATA[JMS]]></category>
		<category><![CDATA[messenging]]></category>

		<guid isPermaLink="false">http://sureshjava.wordpress.com/?p=74</guid>
		<description><![CDATA[JMS is a way of communication between message producers and message consumers. How is it different from RMI? Remote Method Invocation(RMI) is tightly coupled in the sense it requires an application to know a remote application&#8217;s methods to invoke. Where as JMS is loosely coupled in the sense that the sender does not need to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=74&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>JMS is a way of communication between message producers and message consumers.</p>
<p><span style="color:#ff00ff;">How is it different from RMI?</span></p>
<p>Remote Method Invocation(RMI) is tightly coupled in the sense it requires an application      to know a remote application&#8217;s methods to invoke.</p>
<p>Where as JMS is loosely coupled in the sense that the sender does not need to know anything about      the receiver; nor does the receiver need to know anything about the sender.The sender and the receiver need to know only what message format and what      destination to use.The producers send messages to some destination and consumers read messages from that destination.</p>
<p><span style="color:#ff00ff;">How is it different from E-mail Service ?</span></p>
<p><span style="color:#ff00ff;"><span style="color:#000000;">E-mail </span></span>is a method of communication between people or between software applications and people<span style="color:#ff00ff;"><span style="color:#000000;">, where as JMS is a method os communication between </span></span>software applications or software components.</p>
<h4><span style="color:#000000;"><span style="color:#666699;"><span style="color:#ff00ff;">Messenging Domains:</span></span></span></h4>
<ul>
<li><span style="color:#000000;"><span style="color:#666699;"> <span style="color:#ff00ff;"><span style="color:#ff9900;">Point to Point Messenging :</span><br />
<span style="color:#000000;"> Each message is meant for only one consumer and </span></span></span></span>it acknowledges the successful processing of a message.</li>
<li><span style="color:#ff9900;"> Publish-Subscribe Messenging:</span></li>
</ul>
<p>Each message may have multiple subscribers and each subscriber subscribes to a particular Topic for consumption and they  must continue to be active in order for it to consume messages</p>
<p><span style="color:#ff00ff;">What is MOM and How it is related to JMS:</span></p>
<p>A JMS application is composed of the following parts:</p>
<ul>
<li>A JMS provider: A messaging system that implements the JMS  specification.</li>
<li>JMS clients: Java applications that send and receive messages.</li>
<li>Messages: Objects that are used to communicate information between  JMS clients.</li>
<li>Administered objects: Preconfigured JMS objects that are created by  an administrator for the use of JMS clients.Aadministrators configure  administered objects in a    Java<sup>TM</sup> Naming and Directory     Interface<sup>TM</sup> (JNDI) API namespace, and JMS clients then look  them up, using the JNDI API.    J2EE<sup>TM</sup> applications always  use the JNDI API.</li>
</ul>
<p>A message is composed of three parts: <em>header</em>, <em>properties</em>,  and a <em>body</em>.</p>
<ul>
<li>The header, which is required for every message, contains  information that is used for routing and identifying messages. Some of  these fields are set automatically, by the JMS provider, during  producing and delivering a message, and others are set by the client on a  message by message basis.</li>
<li>Properties, which are optional, provide values that clients can use  to filter messages. They provide additional information about the data,  such as which process created it, the time it was created. Properties  can be considered as an extension to the header, and consist of property  name/value pairs. Using properties, clients can fine-tune their  selection of messages by specifying certain values that act as selection  criteria.</li>
<li>The body, which is also optional, contains the actual data to be  exchanged. The JMS specification defined six type or classes of messages  that a JMS provider must support:
<ol>
<li><strong><code>Message</code>:</strong> This represents a message without a  message body.</li>
<li><strong><code>StreamMessage</code></strong>: A message whose body contains a  stream of Java primitive types. It is written and read sequentially.</li>
<li><strong><code>MapMessage</code>:</strong> A message whose body contains a set  of name/value pairs. The order of entries is not defined.</li>
<li><strong><code>TextMessage</code>:</strong> A message whose body contains a  Java string&#8230;such as an XML message.</li>
<li><strong><code>ObjectMessage</code></strong>: A message whose body contains a  serialized Java object.</li>
<li><strong><code>BytesMessage</code></strong>:  A message whose body contains a  stream of uninterpreted bytes.</li>
</ol>
</li>
</ul>
<p>The JMS flow looks like this:</p>
<p><img src="http://sureshjava.files.wordpress.com/2009/12/fig3-1.gif?w=549&#038;h=439" alt="" width="549" height="439" /></p>
<p>Here in the above pic. both Destionations are the same .The above pic  has been taken from  <a href="http://java.sun.com/products/jms/tutorial/1_3_1-fcs/doc/prog_model.html" target="_blank">here</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sureshjava.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sureshjava.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sureshjava.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sureshjava.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sureshjava.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sureshjava.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sureshjava.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sureshjava.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sureshjava.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sureshjava.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sureshjava.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sureshjava.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sureshjava.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sureshjava.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=74&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sureshjava.wordpress.com/2009/12/06/java-messenging-service-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>12.959558 77.646360</georss:point>
		<geo:lat>12.959558</geo:lat>
		<geo:long>77.646360</geo:long>
		<media:content url="http://1.gravatar.com/avatar/96a08f729b114b3830c9e7db2a2ffc71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sureshmandalapu</media:title>
		</media:content>

		<media:content url="http://sureshjava.files.wordpress.com/2009/12/fig3-1.gif" medium="image" />
	</item>
		<item>
		<title>The Adapter Pattern</title>
		<link>http://sureshjava.wordpress.com/2009/12/05/the-adapter-pattern/</link>
		<comments>http://sureshjava.wordpress.com/2009/12/05/the-adapter-pattern/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 09:06:41 +0000</pubDate>
		<dc:creator>sureshmandalapu</dc:creator>
				<category><![CDATA[Structural Patterns]]></category>
		<category><![CDATA[Design Patterns]]></category>

		<guid isPermaLink="false">http://sureshjava.wordpress.com/?p=66</guid>
		<description><![CDATA[This pattern comes under Structural Patterns category. Also known as Wrapper Pattern. The Adapter pattern lets you use an existing class to meet a client class’s needs. When a client specifies its requirements in an interface, you can usually create a new class that implements the interface and subclasses an existing class. This approach creates [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=66&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This pattern comes under <strong>Structural Patterns</strong> category.</p>
<p>Also known as <strong>Wrapper</strong><strong> Pattern.</strong></p>
<p><em>The Adapter pattern lets you use an existing class to meet a client class’s needs. When a client specifies its requirements in an interface, you can usually create a new class that implements the interface and subclasses an existing class. This approach creates a class adapter that translates a client’s calls into calls to the existing class’s methods. This chapter will introduce you to the Adapter pattern in Java</em>.</p>
<p>&#8211;InformIT.com(<a href="http://www.informit.com/articles/article.aspx?p=481863" target="_blank">http://www.informit.com/articles/article.aspx?p=481863</a>)</p>
<p>when developers write web services , they expose only the interfaces to the public(clients), but not the service implementations.But when clients need to consume those  services, they use the service  interfaces to access the services .Sometimes clients feel the service interfaces are not compatible for their usage.Fox ex consider</p>
<p><span style="color:#99cc00;">public</span> <span style="color:#ff9900;">interface</span> EmployeeInfo {</p>
<p>public List getEmpNames();</p>
<p>} Assume the developers has already written the implementation class for this and they had exposed this interface to their clients.</p>
<p>Suppose some client wants only the employee first names , then the client feels that this interface is incompatible for its usage as this is returning employees full names  ,</p>
<p>(i) Also developers can&#8217;t change the implementation now , because they had already deployeed the service ,</p>
<p>(ii) Another drawback is we cannot add  a new method <span style="color:#ff6600;">getEmpFirstNames() </span>in the interafce , because all the sb classes who depend on this interface has to unnecessarily implement this new method.</p>
<p>thats where the Adapter Pattern comes into picture.</p>
<p><span style="color:#ff00ff;">Participents:</span> Client, Target,Adapter,Adoptee.</p>
<p>There are 2 types of implementing Adpter Patterns</p>
<p><span style="color:#ff99cc;">Class Adapter:</span> uses multiple inheritance for adopting interfaces one into another</p>
<p><span style="color:#ff99cc;">Object Adapter:</span> users class composition for adopting interfaces.</p>
<p>The general  call flow will look like this.</p>
<p><img class="aligncenter" src="http://sureshjava.files.wordpress.com/2009/12/adapter.gif?w=428&#038;h=249" alt="" width="428" height="249" /></p>
<h3><span style="color:#ff0000;"><strong>When to use?</strong></span></h3>
<p>Use the Adapter pattern when</p>
<ul>
<li>you want to use an existing class, and its interface does not match the one  you need.</li>
<li>you want to create a reusable class that cooperates with unrelated or  unforeseen classes, that is, classes that don&#8217;t necessarily have compatible  interfaces.</li>
<li><em>(object adapter only)</em> you need to use several existing subclasses,  but it&#8217;s impractical to adapt their interface by subclassing every one. An  object adapter can adapt the interface of its parent class.</li>
</ul>
<p><span style="color:#ff00ff;">Consequences:</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sureshjava.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sureshjava.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sureshjava.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sureshjava.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sureshjava.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sureshjava.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sureshjava.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sureshjava.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sureshjava.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sureshjava.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sureshjava.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sureshjava.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sureshjava.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sureshjava.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=66&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sureshjava.wordpress.com/2009/12/05/the-adapter-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>12.959558 77.646360</georss:point>
		<geo:lat>12.959558</geo:lat>
		<geo:long>77.646360</geo:long>
		<media:content url="http://1.gravatar.com/avatar/96a08f729b114b3830c9e7db2a2ffc71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sureshmandalapu</media:title>
		</media:content>

		<media:content url="http://sureshjava.files.wordpress.com/2009/12/adapter.gif" medium="image" />
	</item>
		<item>
		<title>The Singleton Pattern</title>
		<link>http://sureshjava.wordpress.com/2009/12/04/the-singleton-pattern/</link>
		<comments>http://sureshjava.wordpress.com/2009/12/04/the-singleton-pattern/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 15:12:12 +0000</pubDate>
		<dc:creator>sureshmandalapu</dc:creator>
				<category><![CDATA[Creational Patterns]]></category>

		<guid isPermaLink="false">http://sureshjava.wordpress.com/?p=64</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=64&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=64&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sureshjava.wordpress.com/2009/12/04/the-singleton-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>12.959558 77.646360</georss:point>
		<geo:lat>12.959558</geo:lat>
		<geo:long>77.646360</geo:long>
		<media:content url="http://1.gravatar.com/avatar/96a08f729b114b3830c9e7db2a2ffc71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sureshmandalapu</media:title>
		</media:content>
	</item>
		<item>
		<title>The Observer Pattern</title>
		<link>http://sureshjava.wordpress.com/2009/12/04/the-observer-pattern/</link>
		<comments>http://sureshjava.wordpress.com/2009/12/04/the-observer-pattern/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 09:33:45 +0000</pubDate>
		<dc:creator>sureshmandalapu</dc:creator>
				<category><![CDATA[Behavioural Patterns]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[observer pattern]]></category>

		<guid isPermaLink="false">http://sureshjava.wordpress.com/?p=45</guid>
		<description><![CDATA[This pattern comes under Behavioural Patterns category. Also known as Publish-Subscribe Pattern or Dependents Pattern. Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. When to use this pattern: When an abstraction has two aspects, one dependent on the other, Encapsulating these aspects [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=45&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This pattern comes under <strong>Behavioural Patterns</strong> category.</p>
<p>Also known as <strong>Publish-Subscribe Pattern</strong> or <strong>Dependents Pattern.</strong></p>
<p>Define a one-to-many dependency between objects so that when one object changes  state, all its dependents are notified and updated automatically.</p>
<p><span style="color:#ff00ff;">When to use this pattern:</span></p>
<ul>
<li>When an abstraction has two aspects, one dependent on the other,  Encapsulating these aspects in separate objects lets you vary and reuse them  independently.</li>
<li>When a change to one object requires changing others, and you don&#8217;t know how  many objects need to be changed.</li>
<li>When an object should be able to notify other objects without making  assumptions about who these objects are. In other words, you don&#8217;t want these  objects tightly coupled.</li>
</ul>
<p><span style="color:#ff00ff;">Participents:</span></p>
<p><span style="color:#ff00ff;"> <span style="color:#000000;">Subject , ConcreteSubject , Observer, ConcreteObserver.</span><br />
</span></p>
<p><span style="color:#ff00ff;">How it works:</span></p>
<p><span style="color:#ff00ff;"><span style="color:#000000;"> The  terminology used for different objects  in this pattern are Subject(Publisher) and Observers(Subscribers).</span></span></p>
<p><span style="color:#ff00ff;"><span style="color:#000000;">The Subject is the object who notifies that the change has occured.The Observers are objects  who change their state according the change. </span></span></p>
<p>All observers are notified whenever the subject undergoes a change in state.Each observer will query the subject to synchronize its state with the subject&#8217;s  state.</p>
<p>The Subject notifies its change without even knowing how many dependents(observers) it has and who its observers are.</p>
<p>Any number of observers can subscribe to this subject to receive notifications</p>
<p><a href="http://sureshjava.files.wordpress.com/2009/12/observer11.gif"><img class="aligncenter size-full wp-image-59" title="observer11" src="http://sureshjava.files.wordpress.com/2009/12/observer11.gif?w=780" alt=""   /></a></p>
<p>Please note that the above pic. is taken from GOF Design Patterns site.</p>
<p><span style="color:#ff00ff;">Prons and Cons:</span></p>
<ul>
<li><em> Abstract(loose) coupling between Subject and Observer</em></li>
<li><em> </em><em>Support for broadcast communication</em></li>
<li><em> </em><em>Unexpected updates may cause serious inconsistancy</em></li>
</ul>
<p><span style="color:#ff00ff;">Note:</span></p>
<p>Please go through <em>java.util.Observable</em> and <em>java.util.Observer</em> , if you are interested.</p>
<p><img src="Pictures/observer.gif" alt="" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sureshjava.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sureshjava.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sureshjava.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sureshjava.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sureshjava.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sureshjava.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sureshjava.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sureshjava.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sureshjava.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sureshjava.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sureshjava.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sureshjava.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sureshjava.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sureshjava.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=45&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sureshjava.wordpress.com/2009/12/04/the-observer-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>12.959558 77.646360</georss:point>
		<geo:lat>12.959558</geo:lat>
		<geo:long>77.646360</geo:long>
		<media:content url="http://1.gravatar.com/avatar/96a08f729b114b3830c9e7db2a2ffc71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sureshmandalapu</media:title>
		</media:content>

		<media:content url="http://sureshjava.files.wordpress.com/2009/12/observer11.gif" medium="image">
			<media:title type="html">observer11</media:title>
		</media:content>
	</item>
		<item>
		<title>What is a Design Pattern?</title>
		<link>http://sureshjava.wordpress.com/2009/12/03/what-is-a-design-pattern/</link>
		<comments>http://sureshjava.wordpress.com/2009/12/03/what-is-a-design-pattern/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 18:35:02 +0000</pubDate>
		<dc:creator>sureshmandalapu</dc:creator>
				<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[scea]]></category>

		<guid isPermaLink="false">http://sureshjava.wordpress.com/?p=42</guid>
		<description><![CDATA[In Object Oriented Programming Design , there are some commonly occuring problems while writing the  code, which are reusuability,  scalability,  extensibility, maintainability..etc. A Design Pattern is a language independent style of coding which solves the above stated reoccuring problems and thus they prevent reinventing the wheel. Generally the software  Design Patterns are classified as Creational [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=42&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In Object Oriented Programming Design , there are some commonly occuring problems while writing the  code, which are reusuability,  scalability,  extensibility, maintainability..etc.</p>
<p>A <em>Design Pattern</em> is a language independent style of coding which solves the above stated reoccuring problems and thus they prevent reinventing the wheel.</p>
<p>Generally the software  Design Patterns are classified as</p>
<ul>
<li>Creational patterns</li>
<li>Structural patterns</li>
<li>Behavioral patterns</li>
</ul>
<p>But in terms of J2EE , we classify the patterns as</p>
<ul>
<li>Presentation tier</li>
<li>Business tier</li>
<li>Integration tier</li>
</ul>
<p>Here are some of the good references for  Design Patterns:</p>
<p><a href="http://www.javacamp.org/designPattern/" target="_blank">http://sourcemaking.com/design_patterns</a></p>
<p><a href="http://www.javacamp.org/designPattern/" target="_blank">http://www.javacamp.org/designPattern/</a></p>
<p><a href="http://java.sun.com/blueprints/patterns/catalog.html" target="_blank">http://java.sun.com/blueprints/patterns/catalog.html</a></p>
<p><a href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html">http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html</a></p>
<p>Recommended Books:</p>
<p>1) Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). Design Patterns: Elements of Reusable Object-Oriented Software.</p>
<p>2) Alur, Crupi and Malks (2003). Core J2EE Patterns: Best Practices and Design Strategies 2nd Edition.</p>
<p>3) Design Patterns by Head First  Series</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sureshjava.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sureshjava.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sureshjava.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sureshjava.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sureshjava.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sureshjava.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sureshjava.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sureshjava.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sureshjava.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sureshjava.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sureshjava.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sureshjava.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sureshjava.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sureshjava.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=42&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sureshjava.wordpress.com/2009/12/03/what-is-a-design-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>12.959558 77.646360</georss:point>
		<geo:lat>12.959558</geo:lat>
		<geo:long>77.646360</geo:long>
		<media:content url="http://1.gravatar.com/avatar/96a08f729b114b3830c9e7db2a2ffc71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sureshmandalapu</media:title>
		</media:content>
	</item>
		<item>
		<title>Ganesh pics which I like most !!</title>
		<link>http://sureshjava.wordpress.com/2009/12/02/ganesh-pics-which-i-like-most/</link>
		<comments>http://sureshjava.wordpress.com/2009/12/02/ganesh-pics-which-i-like-most/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 18:00:50 +0000</pubDate>
		<dc:creator>sureshmandalapu</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://sureshjava.wordpress.com/?p=36</guid>
		<description><![CDATA[Hi, these are the Ganesh Pics. which i like most :<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=36&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi, these are the Ganesh Pics. which i like most :</p>
<p><img class="aligncenter" title="GANESHA" src="http://sureshjava.files.wordpress.com/2009/12/ganesha.jpg?w=468&#038;h=590" alt="" width="468" height="590" /></p>

<a href='http://sureshjava.wordpress.com/2009/12/02/ganesh-pics-which-i-like-most/gan_img2/' title='GAN_IMG2'><img data-attachment-id='40' data-orig-size='300,300' data-liked='0'width="150" height="150" src="http://sureshjava.files.wordpress.com/2009/12/gan_img2.jpg?w=150&#038;h=150" class="attachment-thumbnail" alt="GAN_IMG2" title="GAN_IMG2" /></a>
<a href='http://sureshjava.wordpress.com/2009/12/02/ganesh-pics-which-i-like-most/ganesha/' title='GANESHA'><img data-attachment-id='37' data-orig-size='468,590' data-liked='0'width="118" height="150" src="http://sureshjava.files.wordpress.com/2009/12/ganesha.jpg?w=118&#038;h=150" class="attachment-thumbnail" alt="GANESHA" title="GANESHA" /></a>

<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sureshjava.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sureshjava.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sureshjava.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sureshjava.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/sureshjava.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/sureshjava.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/sureshjava.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/sureshjava.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sureshjava.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sureshjava.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sureshjava.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sureshjava.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sureshjava.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sureshjava.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sureshjava.wordpress.com&amp;blog=9313591&amp;post=36&amp;subd=sureshjava&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://sureshjava.wordpress.com/2009/12/02/ganesh-pics-which-i-like-most/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>12.959558 77.646360</georss:point>
		<geo:lat>12.959558</geo:lat>
		<geo:long>77.646360</geo:long>
		<media:content url="http://1.gravatar.com/avatar/96a08f729b114b3830c9e7db2a2ffc71?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sureshmandalapu</media:title>
		</media:content>

		<media:content url="http://sureshjava.files.wordpress.com/2009/12/ganesha.jpg" medium="image">
			<media:title type="html">GANESHA</media:title>
		</media:content>

		<media:content url="http://sureshjava.files.wordpress.com/2009/12/ganesha.jpg?w=118" medium="image">
			<media:title type="html">GANESHA</media:title>
		</media:content>

		<media:content url="http://sureshjava.files.wordpress.com/2009/12/gan_img2.jpg?w=150" medium="image">
			<media:title type="html">GAN_IMG2</media:title>
		</media:content>
	</item>
	</channel>
</rss>
