<?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>All about Information Technology &#187; Hibernate</title>
	<atom:link href="http://didiksoft.wordpress.com/category/programming/java/j2ee/framework/hibernate/feed/" rel="self" type="application/rss+xml" />
	<link>http://didiksoft.wordpress.com</link>
	<description>One of Didik Rawandi's sharing knowledge blog</description>
	<lastBuildDate>Wed, 28 Oct 2009 07:21:12 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='didiksoft.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/f51d625b6c4d61df0c75665cf4769174?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>All about Information Technology &#187; Hibernate</title>
		<link>http://didiksoft.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://didiksoft.wordpress.com/osd.xml" title="All about Information Technology" />
		<item>
		<title>First Hibernate Application</title>
		<link>http://didiksoft.wordpress.com/2007/04/11/first-hibernate-application/</link>
		<comments>http://didiksoft.wordpress.com/2007/04/11/first-hibernate-application/#comments</comments>
		<pubDate>Wed, 11 Apr 2007 02:27:00 +0000</pubDate>
		<dc:creator>didiksoft</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[J2SE]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://didiksoft.wordpress.com/2007/04/11/first-hibernate-application/</guid>
		<description><![CDATA[For the beginning, we will do a very simple console based Hibernate Application.
We will use an in-memory database, so we do not have to install any server stuff.
Feedback about this tutorial appreciated via uchiha_didik@yahoo.com
Let&#8217;s assume we want to have a small application where we can store events
we want to attend and who hosts these events. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=didiksoft.wordpress.com&blog=1203950&post=27&subd=didiksoft&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>For the beginning, we will do a very simple console based Hibernate Application.<br />
We will use an in-memory database, so we do not have to install any server stuff.<br />
Feedback about this tutorial appreciated via <a href="mailto:uchiha_didik@yahoo.com">uchiha_didik@yahoo.com</a></p>
<p>Let&#8217;s assume we want to have a small application where we can store events<br />
we want to attend and who hosts these events. We decide we want to use Hibernate<br />
for storage, because we heard it is the coolest thing in persistence <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So the first thing we will do is set up our development directory and put all<br />
the jar-Files we need in it. We have to download the Hibernate distribution<br />
from the <a href="http://hibernate.org/6.html" target="_blank">Hibernate download<br />
page</a>. Extract the needed jars from the hibernate archive. We will place<br />
them all in a lib directory under the development dir, so your devel directory<br />
should now look like this:</p>
<pre>.   +lib      antlr-2.7.4.jar      cglib-full-2.0.2.jar      commons-collections-2.1.1.jar        commons-logging-1.0.4.jar        hibernate3.jar            jta.jar          dom4j-1.5.2.jar                  jdbc2_0-stdext.jar        log4j-1.2.9.jar</pre>
<h2>The first class</h2>
<p>So the next thing we will do is create a class which represents the events<br />
we want to store. This will be just a simple Java Bean, which contains some<br />
properties. Let&#8217;s look at the code:</p>
<pre>package de.gloegl.road2hibernate;

import java.util.Date;

public class Event {    private String title;    private Date date;    private Long id;

    public Long getId() {        return id;    }

    private void setId(Long id) {        this.id = id;    }

    public Date getDate() {        return date;    }

    public void setDate(Date date) {        this.date = date;    }

    public String getTitle() {        return title;    }

    public void setTitle(String title) {        this.title = title;    }}</pre>
<p>Some things are noteworthy here:</p>
<p>The id property is a unique id for the Event &#8211; all our persistent objects will<br />
need such an id. A good idea when building hibernate applications is to keep<br />
such unique ids separate from the application logic. This means we will not<br />
manipulate the id anywhere in our code, and leave it to Hibernate to care about<br />
it. That&#8217;s why the setter of the id is private, allowing Hibernate to use them<br />
(Hibernate may access property get- and set-Methods of all visibilities), but<br />
shielding it from us.</p>
<p>We are also using a true Long for the id, not a primitive type long. This will<br />
save us a lot of hassles later on &#8211; so always use Objects for the id property,<br />
never primitive types (If it is possible).</p>
<p>We will place this file in a directory called src in our development folder.<br />
The directory should now look like this:</p>
<pre>.   +lib      &lt;here are the jar files&gt;   +src      +de         +gloegl             +road2hibernate                Event.java</pre>
<h2>The mapping file</h2>
<p>As we now have our class to store in the database, we must of course tell hibernate<br />
how to persist it. This is where the mapping file comes into play. The mapping<br />
file tells Hibernate what should stored in the database &#8211; and how.</p>
<p>The outer structure of a mapping file looks like this:</p>
<pre>&lt;?xml version="1.0"?&gt;&lt;!DOCTYPE hibernate-mapping PUBLIC        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&gt;

&lt;hibernate-mapping&gt;

&lt;/hibernate-mapping&gt;</pre>
<p>Between the two <tt>&lt;hibernate-mapping&gt;</tt> tags, we will include a<br />
class element, where we can declare which class this mapping refers to and to<br />
which table in our SQL database the class should be mapped. So step 2 of our<br />
mapping document looks like this:</p>
<pre>&lt;?xml version="1.0"?&gt;&lt;!DOCTYPE hibernate-mapping PUBLIC        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&gt;

&lt;hibernate-mapping&gt;

        &lt;class name="de.gloegl.road2hibernate.Event" table="EVENTS"&gt;

        &lt;/class&gt;

&lt;/hibernate-mapping&gt;</pre>
<p>So what we have done so far is telling hibernate to persist our class Event<br />
to the table EVENTS. No we will have to give hibernate the property to use as<br />
unique identifier &#8211; which is what we have included the id property for. In addition,<br />
as we don&#8217;t want to care about handling this id value, we have to tell hibernate<br />
how to generate the ids. Including this, our mapping file looks like this:</p>
<pre>&lt;?xml version="1.0"?&gt;&lt;!DOCTYPE hibernate-mapping PUBLIC        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&gt;

&lt;hibernate-mapping&gt;

        &lt;class name="de.gloegl.road2hibernate.Event" table="EVENTS"&gt;                &lt;id name="id" column="uid" type="long"&gt;                        &lt;generator class="increment"/&gt;                &lt;/id&gt;        &lt;/class&gt;

&lt;/hibernate-mapping&gt;</pre>
<p>So what does all this mean? The <tt>&lt;id&gt;</tt> element is the declaration<br />
of the id property. name=&#8221;id&#8221; is the name of the property &#8211; hibernate will use<br />
getId and setId to access it. The column attribute tells hibernate which column<br />
of the EVENT table will contain the id. The type attribute tells hibernate about<br />
the property type &#8211; in this case a long. For now the type attribute is not important<br />
to us, if you want to know more about it see <a href="http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html#mapping-types" target="_blank">Hibernate<br />
Documentation</a> (Section 5.2)</p>
<p>The <tt>&lt;generator&gt;</tt> element specifies the id generation technique<br />
to use &#8211; in this case we will use increment, which is a very simple generation<br />
method, but which we will use in our small example as it is sufficient here.</p>
<p>Finally we have to include declarations for the persistent properties in the<br />
mapping file:</p>
<pre>&lt;?xml version="1.0"?&gt;&lt;!DOCTYPE hibernate-mapping PUBLIC        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&gt;

&lt;hibernate-mapping&gt;

        &lt;class name="de.gloegl.road2hibernate.Event" table="EVENTS"&gt;                &lt;id name="id" column="uid" type="long"&gt;                        &lt;generator class="increment"/&gt;                &lt;/id&gt;                &lt;property name="date" type="timestamp"/&gt;                &lt;property name="title" column="eventtitle"/&gt;        &lt;/class&gt;

&lt;/hibernate-mapping&gt;</pre>
<p>There are a few things noteworthy here. At first, just as with the <tt>&lt;id&gt;</tt><br />
element, the name attribute of the <tt>&lt;property&gt;</tt> element tells Hibernate<br />
which get- and set-methods to use.</p>
<p>However, you will notice that the title-property contains a column attribute,<br />
however the date attribute does not. This is possible because when the column<br />
attribute is left out, Hibernate by default uses the property name as column<br />
name.</p>
<p>The next interesting thing is that the title-property lacks a type attribute.<br />
Again, Hibernate will try to determine the correct type itself if the type attribute<br />
is left out. Sometimes however Hibernate just can&#8217;t do that and we have to specify<br />
the type &#8211; as it is the case with the date property. Hibernate can&#8217;t know if<br />
the property will map to a date, timestamp or time column in the database, so<br />
we have to specify this.</p>
<p>We will place the mapping in a file called Event.hbm.xml right in the directory<br />
where our Event class is located. So your directory structure should now look<br />
like this:</p>
<pre>.   +lib      &lt;here are the jar files&gt;   +src      +de         +gloegl             +road2hibernate                Event.java                Event.hbm.xml</pre>
<h2>Configuration and Database</h2>
<p>As we now have our persistent class and the mapping file it is time to configure<br />
Hibernate. Before we do this, we will need a database however, so we go on and<br />
get HSQLDB, a java-based in-memory SQL Database, from the <a href="http://hsqldb.sourceforge.net/" target="_blank">HSQLDB<br />
website</a>. What we need is the hsqldb.jar from the lib directory of the zip<br />
download. We will place it in our lib directory which should now look like this:</p>
<pre>.   +lib      &lt;hibernate jars&gt;      hsqldb.jar   +src      &lt;source and mapping files are here&gt;</pre>
<p>In addition, we will create a directory data right under our development directory,<br />
where hsqldb will store its files.</p>
<p>Now Hibernate configuration can be done in an xml file, which we will call<br />
hibernate.cfg.xml and place it directly in the src folder of our development<br />
directory. This file looks like this:</p>
<pre>&lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;!DOCTYPE hibernate-configuration PUBLIC        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"

 "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&gt;

&lt;hibernate-configuration&gt;

    &lt;session-factory&gt;        &lt;property name="hibernate.connection.driver_class"&gt;org.hsqldb.jdbcDriver&lt;/property&gt;        &lt;property name="hibernate.connection.url"&gt;jdbc:hsqldb:data/test&lt;/property&gt;        &lt;property name="hibernate.connection.username"&gt;sa&lt;/property&gt;        &lt;property name="hibernate.connection.password"&gt;&lt;/property&gt;        &lt;property name="dialect"&gt;org.hibernate.dialect.HSQLDialect&lt;/property&gt;        &lt;property name="show_sql"&gt;true&lt;/property&gt;        &lt;property name="transaction.factory_class"&gt;             org.hibernate.transaction.JDBCTransactionFactory        &lt;/property&gt;        &lt;property name="hibernate.cache.provider_class"&gt;             org.hibernate.cache.HashtableCacheProvider        &lt;/property&gt;        &lt;property name="hibernate.hbm2ddl.auto"&gt;update&lt;/property&gt;

        &lt;mapping resource="de/gloegl/road2hibernate/Event.hbm.xml"/&gt;

    &lt;/session-factory&gt;

&lt;/hibernate-configuration&gt;</pre>
<p>The first four <tt>&lt;property&gt;</tt> elements contain the necessary configuration<br />
for the JDBC-Connection Hibernate will use. The dialect <tt>&lt;property&gt;</tt><br />
element specifies the SQLdialect Hibernate shall generate. Next we specify that<br />
Hibernate shall delegate transactions to the underlying JDBC connection and<br />
specify a simple cache provider (this is without effect because we don&#8217;t use<br />
any caching yet). The next property tells hibernate to automatically adjust<br />
the tables in the database according to our mappings. Finally we give the path<br />
to our mapping file.</p>
<h2>Building</h2>
<p>So finally we can start building our first application. For convenience, we<br />
create a batch file in our development directory which contains all commands<br />
necessary for compilation. Under Windows, this would look like this:</p>
<pre>javac -classpath .\lib\hibernate3.jar -d bin src\de\gloegl\road2hibernate\*.javacopy /Y src\hibernate.cfg.xml bincopy /Y src\de\gloegl\road2hibernate\*.xml bin\de\gloegl\road2hibernate</pre>
<p>We place this file called build.bat in our development directory. If you are<br />
using Linux, you can surely create an equivalent shell script <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Finally we create the bin subdirectory of our development directory to place<br />
the compiled classes in.</p>
<h2>Running</h2>
<p>So now we will create a simple class which will start up Hibernate. It looks<br />
like this:</p>
<pre>package de.gloegl.road2hibernate;

import org.hibernate.SessionFactory;import org.hibernate.HibernateException;import org.hibernate.cfg.Configuration;

public class EventManager {

    public static void main(String[] args) {        Session s = HibernateUtil.currentSession();        HibernateUtil.closeSession();        System.exit(0);        }

}</pre>
<p>This class just uses a class called HibernateUtil to get a Session instance.<br />
HibernateUtil is where all the magic goes on. It uses the so called &#8220;ThreadLocal<br />
Session Pattern&#8221; to keep the current session associated with the current thread.<br />
Lets have a look at it:</p>
<pre>package de.gloegl.road2hibernate;

import org.hibernate.*;import org.hibernate.cfg.*;

public class HibernateUtil {

    private static final SessionFactory sessionFactory;

    static {        try {            // Create the SessionFactory            sessionFactory = new Configuration().configure().buildSessionFactory();        } catch (Throwable ex) {            // Make sure you log the exception, as it might be swallowed            System.err.println("Initial SessionFactory creation failed." + ex);            throw new ExceptionInInitializerError(ex);        }    }

    public static final ThreadLocal session = new ThreadLocal();

    public static Session currentSession() throws HibernateException {        Session s = (Session) session.get();        // Open a new Session, if this Thread has none yet        if (s == null) {            s = sessionFactory.openSession();            session.set(s);        }        return s;    }

    public static void closeSession() throws HibernateException {        Session s = (Session) session.get();        session.set(null);        if (s != null)            s.close();    }}</pre>
<p>This class does not only create the SessionFactory in its static initializer,<br />
but also has a ThreadLocal variable which holds the Session for the current<br />
thread. Make sure you understand the Java concept of a thread-local variable<br />
before you try to use this helper. A more complex and powerful HibernateUtil<br />
class can be found in <a href="http://caveatemptor.hibernate.org/" target="_blank">CaveatEmptor</a></p>
<p>Place both the EventManager.java and the HibernateUtil.java in the directory<br />
where Event.java already is:</p>
<pre>.   +lib      antlr-2.7.4.jar      cglib-full-2.0.2.jar      commons-collections-2.1.1.jar        commons-logging-1.0.4.jar        hibernate3.jar            jta.jar          dom4j-1.5.2.jar                  jdbc2_0-stdext.jar        log4j-1.2.9.jar       hsqldb.jar   +src      +de         +gloegl             +road2hibernate                Event.java                Event.hbm.xml                EventManager.java                HibernateUtil.java      hibernate.cfg.xml   +data   build.bat</pre>
<p>Now compile everything by starting build.bat in the development directory.<br />
Run the application by running this in the development directory (all in one<br />
line):</p>
<pre>java -classpath .\lib\hibernate3.jar;.\lib\log4j-1.2.9.jar;.\lib\jta.jar;.\lib\antlr-2.7.4.jar.\lib\commons-logging-1.0.4.jar;.\lib\hsqldb.jar;.\lib\cglib-full-2.0.2.jar;.\lib\commons-collections-2.1.1.jar;.\lib\dom4j-1.5.2.jar;.\lib\jdbc2_0-stdext.jar;.\bin de.gloegl.road2hibernate.EventManager</pre>
<p>This should produce the following output:</p>
<pre>Initializing Hibernatelog4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).log4j:WARN Please initialize the log4j system properly.Finished Initializing Hibernate</pre>
<p>Let&#8217;s place this line in a batch file too, so we can run it a little more conveniently.<br />
Place it in the development directory, called run.bat (add %1 %2 %3 %4 %5 at<br />
the end of the line).</p>
<p>So we are happy that we don&#8217;t have any errors so far &#8211; but we still want to<br />
see what Hibernate is doing during startup and want to get rid of those warnings,<br />
so we have to configure log4j. This is done by putting the following file called<br />
log4j.properties in your src-Directory:</p>
<pre>log4j.rootCategory=INFO, A1log4j.appender.A1=org.apache.log4j.ConsoleAppenderlog4j.appender.A1.layout=org.apache.log4j.PatternLayoutlog4j.appender.A1.layout.ConversionPattern=%-5p - %m%n</pre>
<p>In addition, the following line has to be added to the build.bat:</p>
<pre>copy /Y src\log4j.properties bin</pre>
<p>We won&#8217;t get into what exactly this all is, in effect it tells log4j to write<br />
all log output to the console.</p>
<p>Now recompile the application by starting build.bat again, and rerun it &#8211; now<br />
there should be detailed info what hibernate is doing in your output.</p>
<h2>Working with persistence</h2>
<p>As we now finally have configured hibernate and our mappings, we take advantage<br />
of hibernate and persist some objects. We will adjust our EventManager class<br />
now to do some work with hibernate.</p>
<p>At first we modify the main-Method:</p>
<pre>public static void main(String[] args) throws java.text.ParseException {    EventManager instance = new EventManager();    if (args[0].equals("store")) {        String title = args[1];        Date theDate = new Date();        instance.store(title, theDate);    }    System.exit(0);    }</pre>
<p>So what we do here is read some arguments from the command line, and if the<br />
first argument to our application is store, we take the second argument as the<br />
title, create a new Date and pass both to the <tt>store</tt> method, where it<br />
gets really interesting:</p>
<pre>private void store(String title, Date theDate) {            try {        Session session = HibernateUtil.currentSession();        Transaction tx = session.beginTransaction();

        Event theEvent = new Event();        theEvent.setTitle(title);        theEvent.setDate(theDate);

        session.save(theEvent);

        tx.commit();        hsqlCleanup(session);        HibernateUtil.closeSession();    } catch (HibernateException e) {        e.printStackTrace();    }}</pre>
<p>Well, isn&#8217;t that cool? We simply create a new Event object, and hand it over<br />
to Hibernate. Hibernate now takes care of creating the SQL, and sending it to<br />
the database. We can even start and stop transactions, which Hibernate will<br />
delegate to the JDBC Connection.</p>
<p>The method hsqlCleanup listed below performs some necessary shutdown code telling<br />
HsqlDB to remove all its lock-files and flush its logs. This is not a direct<br />
hibernate requirement.</p>
<pre>private void hsqlCleanup(Session s) {    try {        s.connection().createStatement().execute("SHUTDOWN");    } catch (Exception e) {    }}</pre>
<p><b>Please not that all the transaction and session handling code in these<br />
examples is extremely unclean, mainly for shortness. Please don&#8217;t use that in<br />
a production app.</b></p>
<p>If we now run the application with <tt>run.bat store Party</tt> an Event object<br />
will be created an persisted to the database.</p>
<p>But now we want to list our stored Events, so we modify the main Method some<br />
more:</p>
<pre>public static void main(String[] args) throws java.text.ParseException {    EventManager instance = new EventManager();    if (args[0].equals("store")) {        String title = args[1];        Date theDate = new Date();        instance.store(title, theDate);    } else if (args[0].equals("list")) {        List events = instance.listEvents();        for (int i = 0; i&lt;events.size(); i++) {            Event theEvent = (Event) events.get(i);            System.out.println(                "Event " + theEvent.getTitle() + " Time: " + theEvent.getDate());        }    }    System.exit(0);    }</pre>
<p>When the first argument is &#8220;list&#8221;, we call <tt>listEvents()</tt> and print<br />
all Events contained in the returned list. <tt>listEvents()</tt> is where the<br />
interesting stuff happens:</p>
<pre>private List listEvents() {    try {        Session session = HibernateUtil.currentSession();        Transaction tx = session.beginTransaction();

        List result = session.createQuery("from Event").list();

        tx.commit();        hsqlCleanup(session);        HibernateUtil.closeSession();

        return result;    } catch (HibernateException e) {        throw new RuntimeException(e.getMessage());    }}</pre>
<p>What we do here is using a HQL (Hibernate Query Language) query to load all<br />
existing Events from the database. Hibernate will generate the appropriate SQL,<br />
send it to the database and populate Event objects with the data. You can create<br />
more complex querys with HQL of course, which we will see in later chapters.</p>
<p>So in this chapter we learned how to setup Hibernate, how to create a mapping<br />
for our classes, and how to store and retrieve objects using Hibernate.</p>
<p>That&#8217;s it for the first chapter, in the next part we will replace our ugly<br />
build.bat with an ant-based build system.</p>
<h2>Code download</h2>
<p>You can download the part one development directory <a href="http://www.gloegl.de/files/road2hibernate/part1.zip" target="_blank">here</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/didiksoft.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/didiksoft.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didiksoft.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didiksoft.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didiksoft.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didiksoft.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didiksoft.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didiksoft.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didiksoft.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didiksoft.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didiksoft.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didiksoft.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=didiksoft.wordpress.com&blog=1203950&post=27&subd=didiksoft&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://didiksoft.wordpress.com/2007/04/11/first-hibernate-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/ff8b88273602da952492775583d41ab8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">didiksoft</media:title>
		</media:content>
	</item>
	</channel>
</rss>