<?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>Joydeepdas's Blog</title>
	<atom:link href="http://joydeepdas.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://joydeepdas.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Tue, 18 Aug 2009 16:38:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='joydeepdas.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Joydeepdas's Blog</title>
		<link>http://joydeepdas.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://joydeepdas.wordpress.com/osd.xml" title="Joydeepdas&#039;s Blog" />
	<atom:link rel='hub' href='http://joydeepdas.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Lifecycle of JSF</title>
		<link>http://joydeepdas.wordpress.com/2009/08/18/lifecycle-of-jsf/</link>
		<comments>http://joydeepdas.wordpress.com/2009/08/18/lifecycle-of-jsf/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 16:38:02 +0000</pubDate>
		<dc:creator>joydeepdas</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://joydeepdas.wordpress.com/?p=93</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=93&amp;subd=joydeepdas&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=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=93&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joydeepdas.wordpress.com/2009/08/18/lifecycle-of-jsf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27967953f694e18267b74bde3d4f68ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">joydeepdas</media:title>
		</media:content>
	</item>
		<item>
		<title>Observer and Observable Example</title>
		<link>http://joydeepdas.wordpress.com/2009/08/18/observer-and-observable-example/</link>
		<comments>http://joydeepdas.wordpress.com/2009/08/18/observer-and-observable-example/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 16:37:05 +0000</pubDate>
		<dc:creator>joydeepdas</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://joydeepdas.wordpress.com/?p=91</guid>
		<description><![CDATA[observer and observable example<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=91&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>observer and observable example</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joydeepdas.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joydeepdas.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joydeepdas.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joydeepdas.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joydeepdas.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joydeepdas.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joydeepdas.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joydeepdas.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joydeepdas.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joydeepdas.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joydeepdas.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joydeepdas.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joydeepdas.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joydeepdas.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=91&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joydeepdas.wordpress.com/2009/08/18/observer-and-observable-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27967953f694e18267b74bde3d4f68ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">joydeepdas</media:title>
		</media:content>
	</item>
		<item>
		<title>How to read Excel Sheet using Java?</title>
		<link>http://joydeepdas.wordpress.com/2009/07/10/how-to-read-excel-sheet-using-java/</link>
		<comments>http://joydeepdas.wordpress.com/2009/07/10/how-to-read-excel-sheet-using-java/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 15:17:45 +0000</pubDate>
		<dc:creator>joydeepdas</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://joydeepdas.wordpress.com/?p=89</guid>
		<description><![CDATA[How to read Excel Sheet using Java?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=89&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How to read Excel Sheet using Java?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joydeepdas.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joydeepdas.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joydeepdas.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joydeepdas.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joydeepdas.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joydeepdas.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joydeepdas.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joydeepdas.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joydeepdas.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joydeepdas.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joydeepdas.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joydeepdas.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joydeepdas.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joydeepdas.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=89&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joydeepdas.wordpress.com/2009/07/10/how-to-read-excel-sheet-using-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27967953f694e18267b74bde3d4f68ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">joydeepdas</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create Chart in Java? A JFreeChart Example.</title>
		<link>http://joydeepdas.wordpress.com/2009/07/10/how-to-create-chart-in-java-a-jfreechart-example/</link>
		<comments>http://joydeepdas.wordpress.com/2009/07/10/how-to-create-chart-in-java-a-jfreechart-example/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 15:15:25 +0000</pubDate>
		<dc:creator>joydeepdas</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://joydeepdas.wordpress.com/?p=86</guid>
		<description><![CDATA[How to create chart in Java? A JFreeChart Example.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=86&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How to create chart in Java? A JFreeChart Example.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joydeepdas.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joydeepdas.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joydeepdas.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joydeepdas.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joydeepdas.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joydeepdas.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joydeepdas.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joydeepdas.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joydeepdas.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joydeepdas.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joydeepdas.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joydeepdas.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joydeepdas.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joydeepdas.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=86&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joydeepdas.wordpress.com/2009/07/10/how-to-create-chart-in-java-a-jfreechart-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27967953f694e18267b74bde3d4f68ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">joydeepdas</media:title>
		</media:content>
	</item>
		<item>
		<title>How to read XML file using java?</title>
		<link>http://joydeepdas.wordpress.com/2009/07/10/how-to-read-xml-file-using-java/</link>
		<comments>http://joydeepdas.wordpress.com/2009/07/10/how-to-read-xml-file-using-java/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 15:13:14 +0000</pubDate>
		<dc:creator>joydeepdas</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://joydeepdas.wordpress.com/?p=84</guid>
		<description><![CDATA[How to read XML file using Java?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=84&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>How to read XML file using Java?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joydeepdas.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joydeepdas.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joydeepdas.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joydeepdas.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joydeepdas.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joydeepdas.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joydeepdas.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joydeepdas.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joydeepdas.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joydeepdas.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joydeepdas.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joydeepdas.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joydeepdas.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joydeepdas.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=84&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joydeepdas.wordpress.com/2009/07/10/how-to-read-xml-file-using-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27967953f694e18267b74bde3d4f68ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">joydeepdas</media:title>
		</media:content>
	</item>
		<item>
		<title>Hibernate Search Example</title>
		<link>http://joydeepdas.wordpress.com/2009/07/05/hibernate-search-example/</link>
		<comments>http://joydeepdas.wordpress.com/2009/07/05/hibernate-search-example/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 06:45:27 +0000</pubDate>
		<dc:creator>joydeepdas</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[hibernate search]]></category>

		<guid isPermaLink="false">http://joydeepdas.wordpress.com/?p=75</guid>
		<description><![CDATA[//&#8212;Employee.java&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; package jd.hs.bdemo; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import org.hibernate.search.annotations.DocumentId; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.Index; import org.hibernate.search.annotations.Indexed; import org.hibernate.search.annotations.Store; @Entity @Table(name = &#8220;EmployeeProfile&#8221;) @Indexed public class Employee implements Serializable {            @Id            @Column(name = &#8220;id&#8221;)            @GeneratedValue            @DocumentId             Integer id;  @Column(name = &#8220;name&#8221;)  @Field(index=Index.TOKENIZED, store=Store.NO)  String [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=75&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#0000ff;"><span style="text-decoration:underline;">//&#8212;<strong>Employee.java</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></span></p>
<p>package jd.hs.bdemo;</p>
<p>import java.io.Serializable;</p>
<p>import javax.persistence.Column;<br />
import javax.persistence.Entity;<br />
import javax.persistence.GeneratedValue;<br />
import javax.persistence.Id;<br />
import javax.persistence.Table;</p>
<p>import org.hibernate.search.annotations.DocumentId;<br />
import org.hibernate.search.annotations.Field;<br />
import org.hibernate.search.annotations.Index;<br />
import org.hibernate.search.annotations.Indexed;<br />
import org.hibernate.search.annotations.Store;</p>
<p>@Entity<br />
@Table(name = &#8220;EmployeeProfile&#8221;)<br />
@Indexed<br />
public class Employee implements Serializable<br />
{<br />
           @Id<br />
           @Column(name = &#8220;id&#8221;)<br />
           @GeneratedValue<br />
           @DocumentId<br />
            Integer id;</p>
<p style="padding-left:30px;"> @Column(name = &#8220;name&#8221;)<br />
 @Field(index=Index.TOKENIZED, store=Store.NO)<br />
 String name;<br />
 <br />
 @Column(name = &#8220;skills&#8221;)<br />
 @Field(index=Index.TOKENIZED, store=Store.NO)<br />
 String skills ;<br />
 <br />
 @Column(name = &#8220;summary&#8221;)<br />
 @Field(index=Index.TOKENIZED, store=Store.NO)<br />
 String summary ;<br />
  </p>
<p style="padding-left:30px;"> public Employee()<br />
 {<br />
 }<br />
 public String toString()<br />
 {<br />
           return &#8220;&#8221; + getId() + &#8221; : &#8221; + getName() + &#8221; : &#8221; + getSkills () + &#8221; : &#8221; + getSummary() ;<br />
 }<br />
 <br />
 public Integer getId()<br />
 {<br />
           return id;<br />
 }<br />
 public void setId(Integer id)<br />
 {<br />
          this.id = id;<br />
 }</p>
<p style="padding-left:30px;"> public String getName()<br />
 {<br />
           return name;<br />
 }<br />
 public void setName(String name)<br />
 {<br />
           this.name = name;<br />
 }<br />
 <br />
 public String getSkills()<br />
 {<br />
            return skills ;<br />
 }<br />
 public void setSkills( String skills)<br />
 {<br />
            this.skills = skills ;<br />
 }<br />
 <br />
 public String getSummary()<br />
 {<br />
           return summary ;<br />
 }<br />
 public void setSummary( String summary)<br />
 {<br />
          this.summary = summary ;<br />
 }  </p>
<p>}<br />
<span style="color:#0000ff;"><strong><span style="text-decoration:underline;">//&#8212; hibernate.cfg.xml&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></strong></span></p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;!DOCTYPE hibernate-configuration PUBLIC<br />
              &#8220;-//Hibernate/Hibernate Configuration DTD 3.0//EN&#8221;<br />
             &#8220;<a href="http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd</a>&#8220;&gt;</p>
<p>&lt;hibernate-configuration&gt;</p>
<p>    &lt;session-factory name=&#8221;factory name&#8221;&gt;</p>
<p>     &lt;!&#8211; Database connection settings &#8211;&gt;<br />
        &lt;property name=&#8221;hibernate.connection.driver_class&#8221;&gt;org.gjt.mm.mysql.Driver&lt;/property&gt;<br />
        &lt;property name=&#8221;hibernate.connection.url&#8221;&gt;jdbc:mysql://localhost:3306/jd68994&lt;/property&gt;<br />
        &lt;property name=&#8221;hibernate.connection.username&#8221;&gt;root&lt;/property&gt;<br />
        &lt;property name=&#8221;hibernate.connection.password&#8221;&gt;joy&lt;/property&gt;<br />
       <br />
        &lt;!&#8211; SQL dialect &#8211;&gt;<br />
        &lt;property name=&#8221;dialect&#8221;&gt;org.hibernate.dialect.MySQL5Dialect&lt;/property&gt;</p>
<p>         &lt;!&#8211; JDBC connection pool (use the built-in) &#8211;&gt;<br />
         &lt;property name=&#8221;connection.pool_size&#8221;&gt;1&lt;/property&gt;<br />
   <br />
   <br />
         &lt;!&#8211; Echo all executed SQL to stdout &#8211;&gt;<br />
         &lt;property name=&#8221;show_sql&#8221;&gt;true&lt;/property&gt;<br />
         &lt;property name=&#8221;hibernate.format_sql&#8221;&gt;true&lt;/property&gt;<br />
       <br />
        &lt;!&#8211; Drop and re-create the database schema on startup &#8211;&gt;<br />
        &lt;property name=&#8221;hbm2ddl.auto&#8221;&gt;update&lt;/property&gt;</p>
<p>         &lt;!&#8211; Enable Hibernate&#8217;s automatic session context management &#8211;&gt;<br />
         &lt;property name=&#8221;current_session_context_class&#8221;&gt;thread&lt;/property&gt;</p>
<p>         &lt;!&#8211; Disable the second-level cache &#8211;&gt;<br />
         &lt;property name=&#8221;cache.provider_class&#8221;&gt;org.hibernate.cache.NoCacheProvider&lt;/property&gt;</p>
<p>        <br />
         &lt;!&#8211; Mapping files &#8211;&gt;       <br />
         &lt;mapping class=&#8221;jd.hs.bdemo.Employee&#8221;/&gt;<br />
   <br />
    &lt;/session-factory&gt;<br />
   <br />
&lt;/hibernate-configuration&gt;<br />
<span style="color:#0000ff;"><strong><span style="text-decoration:underline;">//&#8212;- HibernateUtil.java&#8212;&#8212;&#8212;&#8212;-</span></strong></span></p>
<p>package jd.hs.bdemo;</p>
<p>import org.hibernate.SessionFactory;<br />
import org.hibernate.cfg.AnnotationConfiguration;</p>
<p>public class HibernateUtil<br />
{<br />
           private static final SessionFactory sessionFactory;</p>
<p>           static<br />
          {<br />
                  try<br />
                  {<br />
                           // Create the SessionFactory from hibernate.cfg.xml<br />
                           sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();<br />
                   } <br />
                  catch (Throwable ex)<br />
                  {<br />
                          // Make sure you log the exception, as it might be swallowed<br />
                         System.err.println(&#8220;Initial SessionFactory creation failed.&#8221; + ex);<br />
                         throw new ExceptionInInitializerError(ex);<br />
                  }<br />
         }</p>
<p>        public static SessionFactory getSessionFactory() {<br />
              return sessionFactory;<br />
       }<br />
}<br />
<span style="color:#0000ff;"><strong></strong></span></p>
<p><span style="color:#0000ff;"><strong><span style="text-decoration:underline;">//&#8212;-EmployeeDAO&#8212;&#8212;&#8212;&#8211;</span></strong></span><br />
package jd.hs.bdemo;</p>
<p>import java.util.List;</p>
<p>import org.hibernate.Criteria;<br />
import org.hibernate.Session;<br />
import org.hibernate.SessionFactory;<br />
import org.hibernate.Transaction;</p>
<p>public class EmployeeDAO<br />
{</p>
<p style="padding-left:30px;"> public void save( Employee employee )<br />
 {<br />
               /** Getting the Session Factory and session */<br />
               SessionFactory  sessionFactory  = HibernateUtil.getSessionFactory() ;<br />
               Session   session   =  sessionFactory.openSession()   ;<br />
    <br />
               /** Starting the Transaction */<br />
               Transaction  tx     =  session.beginTransaction()   ;<br />
    <br />
               /** Saving POJO */<br />
               session.save( employee ) ;<br />
    <br />
                /** Commiting the changes */<br />
                tx.commit() ;<br />
                System.out.println(&#8220;Record Inserted&#8221;) ; <br />
    <br />
               /** Closing Session */<br />
               session.close() ;<br />
 }<br />
 <br />
 public List&lt;Employee&gt; retrive()<br />
 {<br />
             List&lt;Employee&gt; listEmployee =  null ;<br />
  <br />
             /** Getting the Session Factory and session */<br />
             SessionFactory  sessionFactory  = HibernateUtil.getSessionFactory() ;<br />
             Session   session   =  sessionFactory.openSession() ;<br />
    <br />
              /** Starting the Transaction */<br />
              Transaction  tx     =  session.beginTransaction()   ;<br />
    <br />
              Criteria  criteria  = session.createCriteria(Employee.class) ;<br />
    <br />
               listEmployee = criteria.list();</p>
<p style="padding-left:30px;">              /** Commiting the changes */<br />
              tx.commit() ;<br />
              System.out.println(&#8220;Records Retrived&#8221;) ; <br />
    <br />
               /** Closing Session */<br />
              session.close() ;<br />
    <br />
              return listEmployee ;<br />
 }</p>
<p>}<br />
<span style="color:#0000ff;"><strong></strong></span></p>
<p><span style="color:#0000ff;"><strong><span style="text-decoration:underline;">//&#8212;&#8212;-EmployeeSearch.java&#8212;&#8212;&#8212;&#8211;</span></strong></span><br />
package jd.hs.bdemo;</p>
<p>import java.util.List;<br />
import org.apache.lucene.analysis.standard.StandardAnalyzer;<br />
import org.apache.lucene.queryParser.MultiFieldQueryParser;<br />
import org.apache.lucene.queryParser.ParseException;</p>
<p>import org.hibernate.Session;<br />
import org.hibernate.Transaction;</p>
<p>import org.hibernate.search.FullTextSession;<br />
import org.hibernate.search.Search;</p>
<p>public class EmployeeSearch<br />
{ </p>
<p style="padding-left:30px;"> // for indexing&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 public void search()<br />
 {<br />
              Session session  = HibernateUtil.getSessionFactory().openSession() ;<br />
  <br />
               FullTextSession  fullTextSession  = Search.getFullTextSession(session) ;<br />
              Transaction   tx      =  fullTextSession.beginTransaction() ;<br />
  <br />
              List&lt;Employee&gt;   employees   = session.createQuery(&#8220;from Employee as employee&#8221;).list();<br />
  <br />
             for (Employee employee : employees)<br />
             {<br />
                     fullTextSession.index(employee);<br />
                     System.out.println( &#8220;&gt;Employee : &#8221; + employee);<br />
              }<br />
              tx.commit(); //index is written at commit time<br />
 }<br />
 <br />
 // for searching&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 public List&lt;Employee&gt; searchEmployee( String searchWord ) throws ParseException<br />
 {<br />
               Session session  = HibernateUtil.getSessionFactory().openSession() ;<br />
  <br />
               FullTextSession  fullTextSession  = Search.getFullTextSession(session) ;<br />
               Transaction   tx      =  fullTextSession.beginTransaction() ;<br />
  <br />
               // create native Lucene query<br />
              String[]    fields     =  new String[]{&#8220;name&#8221;, &#8220;skills&#8221;, &#8220;summary&#8221;};<br />
  <br />
  <br />
               MultiFieldQueryParser     parser  =  new MultiFieldQueryParser(fields, new StandardAnalyzer());<br />
               org.apache.lucene.search.Query   query  =  parser.parse( searchWord );<br />
  <br />
  <br />
               // wrap Lucene query in a org.hibernate.Query<br />
              org.hibernate.Query  hibQuery   = fullTextSession.createFullTextQuery(query, Employee.class);<br />
   <br />
               // execute search<br />
               List&lt;Employee&gt;  listOfEmployee  =  hibQuery.list();<br />
  <br />
  <br />
               tx.commit();<br />
              session.close();<br />
  <br />
              return listOfEmployee ;<br />
  <br />
 }</p>
<p>}</p>
<p><span style="color:#0000ff;"><strong><span style="text-decoration:underline;">//&#8212;&#8212;&#8212;-EmployeeMain.java&#8212;&#8212;&#8212;&#8212;-</span></strong></span></p>
<p>package jd.hs.bdemo;</p>
<p>import java.util.List;</p>
<p>import org.apache.lucene.queryParser.ParseException;</p>
<p>public class EmployeeMain<br />
{<br />
             public static void main(String[] args) throws ParseException<br />
             {<br />
                      // Insert few employee data into database<br />
                       /*<br />
                       new EmployeeDAO().save( EmployeeMain.getEmployee(1, &#8220;Joy&#8221;    , &#8220;Java,Hibernate,Spring,JSF&#8221; , &#8220;Natural,Adabas&#8221;) ) ;<br />
                       new EmployeeDAO().save( EmployeeMain.getEmployee(2, &#8220;MoniLal&#8221;  , &#8220;C#,ASP,.Net&#8221; , &#8221; Fresher&#8221;) ) ;<br />
                       new EmployeeDAO().save( EmployeeMain.getEmployee(3, &#8220;Gozo&#8221;   , &#8220;C#,ASP,.Net&#8221; , &#8221; Experince&#8221;) ) ;<br />
                       new EmployeeDAO().save( EmployeeMain.getEmployee(4, &#8220;Bhuyan&#8221; , &#8220;Java,Ant&#8221; , &#8221; Testing&#8221;) ) ;<br />
                       new EmployeeDAO().save( EmployeeMain.getEmployee(5, &#8220;Gyan&#8221;   , &#8220;C++,C,Oracle&#8221; , &#8221; Java&#8221;) ) ;<br />
                       new EmployeeDAO().save( EmployeeMain.getEmployee(6, &#8220;Gosai&#8221;  , &#8220;Java,JSP,Spring,MySQL&#8221; , &#8221; Developer&#8221;) ) ;<br />
                       new EmployeeDAO().save( EmployeeMain.getEmployee(7, &#8220;Akthar&#8221;  , &#8220;Java,JSP,MySQL,JBoss&#8221;  , &#8221; Sr Software Engineer&#8221;) ) ;<br />
                       new EmployeeDAO().save( EmployeeMain.getEmployee(8, &#8220;Tamuli&#8221;  , &#8220;Java,JSP,Hibernate,Ant,Ishape,&#8221;  , &#8221; Sr Software Engineer, BNP Paribas&#8221;) ) ;<br />
                       new EmployeeDAO().save( EmployeeMain.getEmployee(9, &#8220;GhanaLK&#8221;  , &#8220;Java,JSP,Struts&#8221;  , &#8221; Sr Software Engineer&#8221;) ) ;<br />
                       */  <br />
  <br />
                     //new EmployeeSearch().search() ;<br />
  <br />
                     // search for employee with skill set<br />
                     List&lt;Employee&gt; listOfEmployee = new EmployeeSearch().searchEmployee(&#8220;Ant, C++&#8221;) ;<br />
                     for(Employee employee : listOfEmployee)<br />
                    {<br />
                               System.out.println(employee);<br />
                    }<br />
  <br />
               }<br />
 <br />
               public static Employee getEmployee( Integer id, String name , String skills , String summary)<br />
               {<br />
                          Employee employee = new Employee() ;<br />
  <br />
                         employee.setId(id) ;<br />
                         employee.setName(name) ;<br />
                         employee.setSkills(skills) ;<br />
                         employee.setSummary(summary) ;<br />
  <br />
                        return employee ;<br />
              }</p>
<p>}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joydeepdas.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joydeepdas.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joydeepdas.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joydeepdas.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joydeepdas.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joydeepdas.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joydeepdas.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joydeepdas.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joydeepdas.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joydeepdas.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joydeepdas.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joydeepdas.wordpress.com/75/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joydeepdas.wordpress.com/75/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joydeepdas.wordpress.com/75/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=75&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joydeepdas.wordpress.com/2009/07/05/hibernate-search-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27967953f694e18267b74bde3d4f68ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">joydeepdas</media:title>
		</media:content>
	</item>
		<item>
		<title>resource bundle example</title>
		<link>http://joydeepdas.wordpress.com/2009/05/12/resource-bundle-example/</link>
		<comments>http://joydeepdas.wordpress.com/2009/05/12/resource-bundle-example/#comments</comments>
		<pubDate>Tue, 12 May 2009 07:29:03 +0000</pubDate>
		<dc:creator>joydeepdas</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://joydeepdas.wordpress.com/?p=59</guid>
		<description><![CDATA[// TestResourceBundle.java import java.util.ResourceBundle; public class TestResourceBundle {        static ResourceBundle bundle = null ;        static       {               bundle = ResourceBundle.getBundle(&#8220;messages&#8221;) ;       }        public static void main(String args[])       {               System.out.println( bundle.getString(&#8220;message.second&#8221;) );       } } // messages.properties message.first=FIRST message.second=SECOND<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=59&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>// TestResourceBundle.java<br />
import java.util.ResourceBundle;<br />
public class TestResourceBundle<br />
{<br />
       static ResourceBundle bundle = null ;<br />
       static<br />
      {<br />
              bundle = ResourceBundle.getBundle(&#8220;messages&#8221;) ;<br />
      }</p>
<p>       public static void main(String args[])<br />
      {<br />
              System.out.println( bundle.getString(&#8220;message.second&#8221;) );<br />
      }<br />
}</p>
<p>// messages.properties<br />
message.first=FIRST<br />
message.second=SECOND</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joydeepdas.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joydeepdas.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joydeepdas.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joydeepdas.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joydeepdas.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joydeepdas.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joydeepdas.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joydeepdas.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joydeepdas.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joydeepdas.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joydeepdas.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joydeepdas.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joydeepdas.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joydeepdas.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=59&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joydeepdas.wordpress.com/2009/05/12/resource-bundle-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27967953f694e18267b74bde3d4f68ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">joydeepdas</media:title>
		</media:content>
	</item>
		<item>
		<title>Serialize Java Object into XML</title>
		<link>http://joydeepdas.wordpress.com/2009/03/12/serialize-java-object-into-xml/</link>
		<comments>http://joydeepdas.wordpress.com/2009/03/12/serialize-java-object-into-xml/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 11:06:35 +0000</pubDate>
		<dc:creator>joydeepdas</dc:creator>
				<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://joydeepdas.wordpress.com/?p=51</guid>
		<description><![CDATA[// Employee.java public class Employee {       private String name ;       private double basicSalary ;       //&#8230;&#8230;&#8230;&#8230;       public String getName() {             return name;       }       public void setName(String name) {             this.name = name;       }             public double getBasicSalary() {             return basicSalary;       }       public void setBasicSalary(double [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=51&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1 class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="color:#7f0055;font-family:&quot;">// Employee.java</span></span></h1>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><strong><span style="color:#7f0055;font-family:&quot;">public</span></strong><span style="font-family:&quot;"> </span><strong><span style="color:#7f0055;font-family:&quot;">class</span></strong><span style="font-family:&quot;"> Employee </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">{</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      </span><strong><span style="color:#7f0055;font-family:&quot;">private</span></strong><span style="font-family:&quot;"> String </span><span style="color:#0000c0;font-family:&quot;">name</span><span style="font-family:&quot;"> ;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      </span><strong><span style="color:#7f0055;font-family:&quot;">private</span></strong><span style="font-family:&quot;"> </span><strong><span style="color:#7f0055;font-family:&quot;">double</span></strong><span style="font-family:&quot;"> </span><span style="color:#0000c0;font-family:&quot;">basicSalary</span><span style="font-family:&quot;"> ;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      </span><span style="color:#3f7f5f;font-family:&quot;">//&#8230;&#8230;&#8230;&#8230;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      </span><strong><span style="color:#7f0055;font-family:&quot;">public</span></strong><span style="font-family:&quot;"> String getName() {</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            </span><strong><span style="color:#7f0055;font-family:&quot;">return</span></strong><span style="font-family:&quot;"> </span><span style="color:#0000c0;font-family:&quot;">name</span><span style="font-family:&quot;">;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      }</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      </span><strong><span style="color:#7f0055;font-family:&quot;">public</span></strong><span style="font-family:&quot;"> </span><strong><span style="color:#7f0055;font-family:&quot;">void</span></strong><span style="font-family:&quot;"> setName(String name) {</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            </span><strong><span style="color:#7f0055;font-family:&quot;">this</span></strong><span style="font-family:&quot;">.</span><span style="color:#0000c0;font-family:&quot;">name</span><span style="font-family:&quot;"> = name;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      }</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      </span><strong><span style="color:#7f0055;font-family:&quot;">public</span></strong><span style="font-family:&quot;"> </span><strong><span style="color:#7f0055;font-family:&quot;">double</span></strong><span style="font-family:&quot;"> getBasicSalary() {</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            </span><strong><span style="color:#7f0055;font-family:&quot;">return</span></strong><span style="font-family:&quot;"> </span><span style="color:#0000c0;font-family:&quot;">basicSalary</span><span style="font-family:&quot;">;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      }</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      </span><strong><span style="color:#7f0055;font-family:&quot;">public</span></strong><span style="font-family:&quot;"> </span><strong><span style="color:#7f0055;font-family:&quot;">void</span></strong><span style="font-family:&quot;"> setBasicSalary(</span><strong><span style="color:#7f0055;font-family:&quot;">double</span></strong><span style="font-family:&quot;"> basicSalary) {</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            </span><strong><span style="color:#7f0055;font-family:&quot;">this</span></strong><span style="font-family:&quot;">.</span><span style="color:#0000c0;font-family:&quot;">basicSalary</span><span style="font-family:&quot;"> = basicSalary;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      }</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      </span><strong><span style="color:#7f0055;font-family:&quot;">public</span></strong><span style="font-family:&quot;"> <span style="background:silver;">String</span> toString()</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      {</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            </span><strong><span style="background:silver;color:#7f0055;font-family:&quot;">return</span></strong><span style="background:silver;font-family:&quot;"> getName() + </span><span style="background:silver;color:#2a00ff;font-family:&quot;">&#8221; &#8220;</span><span style="background:silver;font-family:&quot;"> + getBasicSalary() ;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      }</span></span></p>
<p class="MsoNormal" style="margin:0 0 auto;"><span style="font-size:x-small;"><span style="font-family:&quot;">}</span></span></p>
<p class="MsoNormal" style="line-height:115%;margin:0;"> </p>
<h1 class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="color:#7f0055;font-family:&quot;">// <span style="color:#800080;">SerializeJavaObjectToXML.java</span></span></span></h1>
<p class="MsoNormal" style="line-height:115%;margin:0;"> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><strong><span style="color:#7f0055;font-family:&quot;">import</span></strong><span style="font-family:&quot;"> java.io.FileNotFoundException;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><strong><span style="color:#7f0055;font-family:&quot;">import</span></strong><span style="font-family:&quot;"> java.io.FileOutputStream;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><strong><span style="color:#7f0055;font-family:&quot;">import</span></strong><span style="font-family:&quot;"> java.io.ObjectOutputStream;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><strong><span style="color:#7f0055;font-family:&quot;">import</span></strong><span style="font-family:&quot;"> java.io.OutputStreamWriter;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="color:windowtext;font-family:&quot;"><span style="font-size:x-small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><strong><span style="color:#7f0055;font-family:&quot;">import</span></strong><span style="font-family:&quot;"> com.thoughtworks.xstream.XStream;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="color:windowtext;font-family:&quot;"><span style="font-size:x-small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="color:windowtext;font-family:&quot;"><span style="font-size:x-small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><strong><span style="color:#7f0055;font-family:&quot;">public</span></strong><span style="font-family:&quot;"> </span><strong><span style="color:#7f0055;font-family:&quot;">class</span></strong><span style="font-family:&quot;"> SerializeJavaObjectToXML </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">{</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      </span><strong><span style="color:#7f0055;font-family:&quot;">public</span></strong><span style="font-family:&quot;"> </span><strong><span style="color:#7f0055;font-family:&quot;">static</span></strong><span style="font-family:&quot;"> </span><strong><span style="color:#7f0055;font-family:&quot;">void</span></strong><span style="font-family:&quot;"> main(String args[])</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      {</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            String root       = </span><span style="color:#2a00ff;font-family:&quot;">&#8220;employees&#8221;</span><span style="font-family:&quot;"> ;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            String fileName = </span><span style="color:#2a00ff;font-family:&quot;">&#8220;employeeXml&#8221;</span><span style="font-family:&quot;"> ;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            String element    = </span><span style="color:#2a00ff;font-family:&quot;">&#8220;employee&#8221;</span><span style="font-family:&quot;"> ;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            Employee employee = </span><strong><span style="color:#7f0055;font-family:&quot;">new</span></strong><span style="font-family:&quot;"> Employee() ;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            employee.setName(</span><span style="color:#2a00ff;font-family:&quot;">&#8220;Joydeep Das&#8221;</span><span style="font-family:&quot;">) ;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            employee.setBasicSalary(10000.00) ;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            <em>saveToXML</em>(root, fileName, element, employee) ;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      }</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      </span><strong><span style="color:#7f0055;font-family:&quot;">public</span></strong><span style="font-family:&quot;"> </span><strong><span style="color:#7f0055;font-family:&quot;">static</span></strong><span style="font-family:&quot;"> </span><strong><span style="color:#7f0055;font-family:&quot;">void</span></strong><span style="font-family:&quot;"> saveToXML( String root, String fileName, String element, Employee employee )</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      {</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            </span><strong><span style="color:#7f0055;font-family:&quot;">try</span></strong><span style="font-family:&quot;"> {</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">                  </span><span style="color:#3f7f5f;font-family:&quot;">//Serialize the object</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">              XStream               xs    =     </span><strong><span style="color:#7f0055;font-family:&quot;">new</span></strong><span style="font-family:&quot;"> XStream();</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">          </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">              ObjectOutputStream out      =     xs.createObjectOutputStream( </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">                        </span><strong><span style="color:#7f0055;font-family:&quot;">new</span></strong><span style="font-family:&quot;"> OutputStreamWriter(</span><strong><span style="color:#7f0055;font-family:&quot;">new</span></strong><span style="font-family:&quot;"> FileOutputStream( fileName +</span><span style="color:#2a00ff;font-family:&quot;">&#8220;.xml&#8221;</span><span style="font-family:&quot;">), </span><span style="color:#2a00ff;font-family:&quot;">&#8220;UTF8&#8243;</span><span style="font-family:&quot;">), root);</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">              </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">              xs.alias(element, ((Employee)employee).getClass()) ;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">                  out.writeObject( employee );</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">               </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">                  out.close() ;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            } </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            </span><strong><span style="color:#7f0055;font-family:&quot;">catch</span></strong><span style="font-family:&quot;">       ( FileNotFoundException e)  { e.printStackTrace();          }</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">            </span><strong><span style="color:#7f0055;font-family:&quot;">catch</span></strong><span style="font-family:&quot;"> ( Exception E )               {     System.</span><em><span style="color:#0000c0;font-family:&quot;">out</span></em><span style="font-family:&quot;">.println( E );      }</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:x-small;"><span style="font-family:&quot;">      }</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:&quot;"><span style="font-size:x-small;">}</span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joydeepdas.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joydeepdas.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joydeepdas.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joydeepdas.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joydeepdas.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joydeepdas.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joydeepdas.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joydeepdas.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joydeepdas.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joydeepdas.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joydeepdas.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joydeepdas.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joydeepdas.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joydeepdas.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=51&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joydeepdas.wordpress.com/2009/03/12/serialize-java-object-into-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27967953f694e18267b74bde3d4f68ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">joydeepdas</media:title>
		</media:content>
	</item>
		<item>
		<title>Hello world!</title>
		<link>http://joydeepdas.wordpress.com/2009/02/10/hello-world/</link>
		<comments>http://joydeepdas.wordpress.com/2009/02/10/hello-world/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 11:10:13 +0000</pubDate>
		<dc:creator>joydeepdas</dc:creator>
				<category><![CDATA[C]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=1&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Welcome to <a href="http://wordpress.com/">WordPress.com</a>. This is your first post. Edit or delete it and start blogging!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/joydeepdas.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/joydeepdas.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/joydeepdas.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/joydeepdas.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/joydeepdas.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/joydeepdas.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/joydeepdas.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/joydeepdas.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/joydeepdas.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/joydeepdas.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/joydeepdas.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/joydeepdas.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/joydeepdas.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/joydeepdas.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=joydeepdas.wordpress.com&amp;blog=6527198&amp;post=1&amp;subd=joydeepdas&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://joydeepdas.wordpress.com/2009/02/10/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/27967953f694e18267b74bde3d4f68ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">joydeepdas</media:title>
		</media:content>
	</item>
	</channel>
</rss>
