<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7094180513846470970</atom:id><lastBuildDate>Tue, 07 Feb 2012 19:29:12 +0000</lastBuildDate><category>Spring 2.0 Custom Namespaces</category><category>Sorting</category><category>Adding Jar to Local Repository</category><category>JPA</category><category>org.dbunit.ant.DbUnitTask</category><category>Websphere 6.1 Ant Tasks</category><category>Installing Application to Websphere 6.1 using Ant</category><category>Seam framework</category><category>Spring Framework</category><category>Stopping Websphere 6.1 from Ant</category><category>Hibernate</category><category>StringBuffer and StringBuilder Comparision.</category><category>Data Model</category><category>Spring Transaction Management</category><category>Sorting in Java</category><category>Integrating DbUnit With Ant</category><category>SET ARITHABORT ON</category><category>Ajax</category><category>Transactions in Spring Framework</category><category>Spring Hibernate Integration Examples</category><category>String Comparision</category><category>String Comparision in Java</category><category>String Sorting</category><category>Spring</category><category>Spring2.0</category><category>Hibernate Example</category><category>ACEGI</category><category>DbUnit</category><category>org.slf4j.LoggerFactory</category><category>Symbilic Links Windows</category><category>My SQL</category><category>Start Websphere 6.1 from Ant</category><category>jQuery</category><category>Spring AOP</category><category>Maven Install</category><category>Maven Eclipse</category><category>Request Headers</category><category>Mac Symbolic Link</category><category>Java File</category><category>Java</category><category>Spring Example</category><category>RichFaces</category><category>EJB 3.0</category><category>Transactions</category><category>Webservices</category><category>Tomcat</category><category>SET ARITHABORT ON in JDBC</category><category>String Sorting Gotchas in Java.</category><category>Spring 2.0</category><category>Axis 2</category><category>Dulipalli</category><category>Transaction in EJB 3.0</category><category>JSF</category><category>Spring Hibernate Integration</category><category>Spring Transactions</category><category>Maven Eclipse Workspace Configuration</category><category>JavaScript</category><category>Left Join fetch</category><category>File Length</category><category>SpringFrameworkUpdate</category><title>J2eeapplications</title><description>Venkat Dulipalli's Blog on Spring and J2ee applications.Here you can find all the latest technologies examples and the source code.You can request for a example on any technology which is related to J2EE.</description><link>http://j2eeframeworks.blogspot.com/</link><managingEditor>noreply@blogger.com (Venkat Dulipalli)</managingEditor><generator>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/J2eeapplications" /><feedburner:info uri="j2eeapplications" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-3399022391583510663</guid><pubDate>Tue, 07 Feb 2012 19:27:00 +0000</pubDate><atom:updated>2012-02-07T11:29:12.027-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Mac Symbolic Link</category><category domain="http://www.blogger.com/atom/ns#">Symbilic Links Windows</category><title>Symbolic links for directories</title><description>In windows..&lt;br /&gt;&lt;br /&gt;mklink /D static V:\workspace\wmt\static&lt;br /&gt;&lt;br /&gt;In Mac..&lt;br /&gt;&lt;br /&gt;ln -s /Volumes/Classic/ Classic&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-3399022391583510663?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=kOMdNUx5BXU:dUSlaQWRCRw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=kOMdNUx5BXU:dUSlaQWRCRw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/kOMdNUx5BXU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/kOMdNUx5BXU/symbolic-links-for-directories.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2012/02/symbolic-links-for-directories.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-5075220038335051110</guid><pubDate>Wed, 28 Dec 2011 03:56:00 +0000</pubDate><atom:updated>2011-12-27T19:56:30.798-08:00</atom:updated><title>Setting the Content Disposition in Web apps</title><description>response.setContentType("application/pdf");&lt;br /&gt;   response.setHeader("Content-Type", "application/pdf");&lt;br /&gt;   response.setHeader("Content-disposition", "attachment; filename=filename.pdf");&lt;br /&gt;   String s=new String("naveen");&lt;br /&gt;   response.getOutputStream().write(s.getBytes());&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-5075220038335051110?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=VNmgY722YNc:vaXa5kpy6lU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=VNmgY722YNc:vaXa5kpy6lU:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/VNmgY722YNc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/VNmgY722YNc/setting-content-disposition-in-web-apps.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2011/12/setting-content-disposition-in-web-apps.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-1643744445995024758</guid><pubDate>Fri, 11 Mar 2011 23:12:00 +0000</pubDate><atom:updated>2011-03-11T15:15:18.626-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">File Length</category><category domain="http://www.blogger.com/atom/ns#">Java File</category><title>Finding File Length using Java</title><description>It is just a single line of code we can use to find the length of the file. I am not aware of this method until now. I am writing this down so that if someone searches they can find that easily.&lt;br /&gt;&lt;br /&gt;//File Location.&lt;br /&gt;File file=new File("C:\\test.txt");&lt;br /&gt;//File Length..&lt;br /&gt;System.out.println("File Length : "+file.length());&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Venkat&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-1643744445995024758?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=WWEJGL9-CGM:0VjxRYYgzzM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=WWEJGL9-CGM:0VjxRYYgzzM:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/WWEJGL9-CGM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/WWEJGL9-CGM/finding-file-length-using-java.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2011/03/finding-file-length-using-java.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-3774887285404329782</guid><pubDate>Thu, 21 Oct 2010 16:19:00 +0000</pubDate><atom:updated>2010-10-21T09:22:46.902-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Maven Eclipse Workspace Configuration</category><category domain="http://www.blogger.com/atom/ns#">Maven Eclipse</category><title>Maven Eclipse Plugin Usage</title><description>All,&lt;br /&gt;&lt;br /&gt;I am trying to write down the commands to use Maven Eclipse Plugin Successfully.&lt;br /&gt;&lt;br /&gt;1. mvn eclipse:clean - Cleans all the Eclipse Project Generated Files.&lt;br /&gt;2. mvn eclipse:eclipse - Generates all the required eclipse files like .project,.classpath and .settings folder.&lt;br /&gt;3.  mvn eclipse:configure-workspace -Declipse.workspace=C:\workspace\xyz&lt;br /&gt;&lt;br /&gt;Will add more while using them. until now I have use m2clipse plugin and changing to use maven eclipse plugin.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-3774887285404329782?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=uuJ5qII07X0:CA48Jn0J8Qc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=uuJ5qII07X0:CA48Jn0J8Qc:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/uuJ5qII07X0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/uuJ5qII07X0/maven-eclipse-plugin-usage.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2010/10/maven-eclipse-plugin-usage.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-2393781536756843957</guid><pubDate>Mon, 30 Aug 2010 22:47:00 +0000</pubDate><atom:updated>2010-08-30T16:03:24.686-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Maven Install</category><category domain="http://www.blogger.com/atom/ns#">Adding Jar to Local Repository</category><title>Adding Your Own Jar File to Maven Repository</title><description>Hi,&lt;br /&gt;&lt;br /&gt;I have written this for my reference as I have a need to add the jar files to the repository occasionally ( Do not want to forget what I have done).&lt;br /&gt;&lt;br /&gt;I wanted to add Amazon Web Services Java Version Jar. Here is how I did.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;mvn install:install-file -DgroupId=com.tekcubes.amazonws  \&lt;br /&gt;-DartifactId=amazonws  \&lt;br /&gt;-Dversion=1.0  \&lt;br /&gt;-Dfile=C:\aws-java-sdk-1.0.008\lib\aws-java-sdk-1.0.008.jar  \&lt;br /&gt;-Dpackaging=jar \&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Let me know if you wanted to find more information on this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-2393781536756843957?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=2vefGwQEC-Y:2LwSEEGqmh4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=2vefGwQEC-Y:2LwSEEGqmh4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/2vefGwQEC-Y" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/2vefGwQEC-Y/adding-your-own-jar-file-to-maven.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2010/08/adding-your-own-jar-file-to-maven.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-6110847320046087976</guid><pubDate>Sat, 01 May 2010 04:07:00 +0000</pubDate><atom:updated>2010-04-30T21:13:39.668-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">Request Headers</category><category domain="http://www.blogger.com/atom/ns#">Ajax</category><category domain="http://www.blogger.com/atom/ns#">jQuery</category><title>JQuery Request Headers</title><description>//To Set the content type in jQuery Ajax call use the following parameter in&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;jQuery.ajax({&lt;br /&gt;//All different parameters&lt;br /&gt;contentType: "application/x-www-form-urlencoded"&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If you want to set the request header before you send the request.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;jQuery.ajax({&lt;br /&gt;beforeSend: function(xhr){&lt;br /&gt;                        //xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); &lt;br /&gt;                    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Feel free to contact me if you require more information.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-6110847320046087976?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=u-NoA6yllDs:z79LKzpkRTI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=u-NoA6yllDs:z79LKzpkRTI:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/u-NoA6yllDs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/u-NoA6yllDs/jquery-request-headers.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2010/04/jquery-request-headers.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-2708066285023351229</guid><pubDate>Wed, 29 Oct 2008 15:01:00 +0000</pubDate><atom:updated>2008-10-29T08:12:48.322-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SET ARITHABORT ON in JDBC</category><category domain="http://www.blogger.com/atom/ns#">SET ARITHABORT ON</category><title>INSERT failed because the following SET options have incorrect settings: 'ARITHABORT'</title><description>&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;Error of the day:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;[10/17/08 13:20:48:328 CDT] 00000114 SystemErr R com.microsoft.sqlserver.jdbc.SQLServerException: INSERT failed because the following SET options have incorrect settings: 'ARITHABORT'.&lt;br /&gt;[10/17/08 13:20:48:328 CDT] 00000114 SystemErr R at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)&lt;br /&gt;[10/17/08 13:20:48:328 CDT] 00000114 SystemErr R at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)&lt;br /&gt;[10/17/08 13:20:48:328 CDT] 00000114 SystemErr R at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.getPrepExecResponse(Unknown Source)&lt;br /&gt;[10/17/08 13:20:48:328 CDT] 00000114 SystemErr R at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)&lt;br /&gt;[10/17/08 13:20:48:328 CDT] 00000114 SystemErr R at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PreparedStatementExecutionRequest.executeStatement(Unknown Source)&lt;br /&gt;[10/17/08 13:20:48:328 CDT] 00000114 SystemErr R at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)&lt;br /&gt;[10/17/08 13:20:48:328 CDT] 00000114 SystemErr R at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)&lt;br /&gt;[10/17/08 13:20:48:328 CDT] 00000114 SystemErr R at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)&lt;br /&gt;[10/17/08 13:20:48:328 CDT] 00000114 SystemErr R at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteQuery(WSJdbcPreparedStatement.java:878)&lt;br /&gt;[10/17/08 13:20:48:328 CDT] 00000114 SystemErr R at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java:559)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;Solution for the above problem:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#333333;"&gt;you will get the above problem if you have any indexed views on tables which you are trying to insert in SQL Server.  To get rid of this problem you need to SET ARITHABORT ON before executing the insert statement on the connection.&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:#333333;"&gt;Connection con=dataSource.getConnection();&lt;br /&gt;Statement dbStatement = con.createStatement();&lt;br /&gt;dbStatement.execute("SET ARITHABORT ON");&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;After this you need to execute your insert statement like.&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Statement dbStatement = con.createStatement();&lt;br /&gt;dbStatement.execute("insert into table statement");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Venkat&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#006600;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-2708066285023351229?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=WYjU5F0Cdew:SQ9O29DVYoM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=WYjU5F0Cdew:SQ9O29DVYoM:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/WYjU5F0Cdew" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/WYjU5F0Cdew/insert-failed-because-following-set.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2008/10/insert-failed-because-following-set.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-8583119125029988286</guid><pubDate>Thu, 23 Oct 2008 21:00:00 +0000</pubDate><atom:updated>2008-10-23T14:49:47.134-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Stopping Websphere 6.1 from Ant</category><category domain="http://www.blogger.com/atom/ns#">Installing Application to Websphere 6.1 using Ant</category><category domain="http://www.blogger.com/atom/ns#">Websphere 6.1 Ant Tasks</category><category domain="http://www.blogger.com/atom/ns#">Start Websphere 6.1 from Ant</category><title>Websphere 6.1 Ant tasks</title><description>Hi Everybody,&lt;br /&gt;&lt;br /&gt;I tries to search google for information on websphere 6.1 ant tasks and I am not very successful finding real examples showing to start servers and starting the server with profiles.&lt;br /&gt;&lt;br /&gt;I thought it would be helpful if I post my examples on using websphere Ant tasks.&lt;br /&gt;&lt;br /&gt;IBM provided the ant tasks to &lt;span style="color:#000099;"&gt;&lt;strong&gt;Start Server&lt;/strong&gt;, &lt;strong&gt;Stop Application&lt;/strong&gt;, &lt;strong&gt;Install Application&lt;/strong&gt;, &lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000099;"&gt;&lt;strong&gt;Start Application&lt;/strong&gt;, &lt;strong&gt;Uninstall Application, Stop Server&lt;/strong&gt; and &lt;strong&gt;Deploying EJB's and Webservices.&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Here I am trying define all tasks in one target and I want to depend on that target for all tasks.I want to list the usgae of each one in different targets.&lt;br /&gt;&lt;br /&gt;Websphere Start Server Task Usage:&lt;br /&gt;&lt;br /&gt;1. For this task we need to define the wsStartServer task.&lt;br /&gt;2. And use that task to start the server.&lt;br /&gt;&lt;br /&gt;Here are my server and profile details :&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Server&lt;/strong&gt; = server1&lt;br /&gt;&lt;strong&gt;Profile&lt;/strong&gt; = Dev&lt;br /&gt;&lt;strong&gt;Application Name &lt;/strong&gt;= TestEar -- This is the display name in the application.xml&lt;br /&gt;I used two variables in the build file those are &lt;br /&gt;&lt;strong&gt;local.websphere.path&lt;/strong&gt; - has to point to your websphere dir. (C:\\IBM\\SDP70\\runtimes\base_v61)&lt;br /&gt;&lt;strong&gt;output.dir&lt;/strong&gt; - it has to point to where your EAR file was created.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;&amp;lttarget name="init"&amp;gt&lt;br /&gt;  &amp;ltpath id="ibm.ant.class.path"&amp;gt&lt;br /&gt;    &amp;ltfileset dir="${local.websphere.path}\lib"&amp;gt&lt;br /&gt;     &amp;ltinclude name="*.jar"&amp;gt&lt;br /&gt;    &amp;lt/fileset&amp;gt&lt;br /&gt;    &amp;ltfileset dir="${local.websphere.path}\plugins"&amp;gt&lt;br /&gt;     &amp;ltinclude name="*.jar"&amp;gt&lt;br /&gt;    &amp;lt/fileset&amp;gt&lt;br /&gt;    &amp;ltfileset dir="${local.websphere.path}\java\lib"&amp;gt&lt;br /&gt;     &amp;ltinclude name="*.jar"&amp;gt&lt;br /&gt;    &amp;lt/fileset&amp;gt&lt;br /&gt;&amp;lt/path&amp;gt&lt;br /&gt;&lt;br /&gt;  &amp;lttaskdef name="wsInstallApp" classpathref="ibm.ant.class.path"      classname="com.ibm.websphere.ant.tasks.InstallApplication"&amp;gt&lt;br /&gt;&lt;br&gt;&lt;/br&gt;&lt;br /&gt;  &amp;lttaskdef name="wsStopApplication" classpathref="ibm.ant.class.path"  classname="com.ibm.websphere.ant.tasks.StopApplication"&amp;gt&lt;br /&gt;&lt;br&gt;&lt;/br&gt;&lt;br /&gt;  &amp;lttaskdef name="wsStartApplication" classpathref="ibm.ant.class.path" classname="com.ibm.websphere.ant.tasks.StartApplication"&amp;gt&lt;br /&gt;&lt;br&gt;&lt;/br&gt;&lt;br /&gt;  &amp;lttaskdef name="wsStartServer" classpathref="ibm.ant.class.path" classname="com.ibm.websphere.ant.tasks.StartServer"&amp;gt&lt;br /&gt;&lt;br&gt;&lt;/br&gt;&lt;br /&gt;  &amp;lttaskdef name="wsStopServer" classpathref="ibm.ant.class.path" classname="com.ibm.websphere.ant.tasks.StopServer"&amp;gt&lt;br /&gt;&lt;br&gt;&lt;/br&gt;&lt;br /&gt;  &amp;lttaskdef name="wsStartApplication" classpathref="ibm.ant.class.path" classname="com.ibm.websphere.ant.tasks.StartApplication"&amp;gt&lt;br /&gt;&lt;br&gt;&lt;/br&gt;&lt;br /&gt;  &amp;lttaskdef name="wsUninstallApp" classpathref="ibm.ant.class.path" classname="com.ibm.websphere.ant.tasks.UninstallApplication"&amp;gt&lt;br /&gt;&lt;br&gt;&lt;/br&gt;&lt;br /&gt;&amp;lt/target&amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color:#000099;"&gt;Starting Websphere Server with Ant:&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;Usage of the wsStartServer task&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lttarget name="startWebsphereServer" depends="init"&amp;gt&lt;br /&gt;  &amp;ltwsStartServer server="server1" profilename="Dev" failonerror="true" washome="${local.websphere.path}"&amp;gt&lt;br /&gt;&amp;lt/target&amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The above one does not worked for me I don't know what could be the reason. It does not show any exception or error while running the task.Though it was stopping the server process it created after the task is over. That's why I am using the execuatable they have given to start the Server.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lttarget name="startWebsphereServer" depends="init"&amp;gt&lt;br /&gt; &amp;ltexec dir="${local.websphere.path}\bin" executable="cmd"&amp;gt&lt;br /&gt;   &amp;ltarg line="/c startServer.bat server1 -profileName Dev"&amp;gt&lt;br /&gt; &amp;lt/exec&amp;gt&lt;br /&gt;&amp;lt/target&amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000099;"&gt;&lt;strong&gt;&lt;em&gt;Stopping Websphere Server with Ant:&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;Usage of the wsStopServer task&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lttarget name="stopWebsphereServer" depends="init"&amp;gt&lt;br /&gt;  &amp;ltwsstopserver server="server1" profilename="Dev" failonerror="true"  washome="${local.websphere.path}"&amp;gt&lt;br /&gt;&amp;lt/target&amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#000099;"&gt;&lt;strong&gt;&lt;em&gt;Uninstalling Apllication From Websphere using Ant:&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lttarget name="unInstallApplication" depends="init"&amp;gt&lt;br /&gt;  &amp;ltwsuninstallapp profilename="Dev" application="TestEar" washome="${local.websphere.path}"&amp;gt&lt;br /&gt;  &amp;lt/wsuninstallapp&amp;gt&lt;br /&gt;&amp;lt/target&amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color:#000099;"&gt;Installing Apllication From Websphere using Ant:&lt;br /&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lttarget name="InstallApplication" depends="init"&amp;gt&lt;br /&gt;  &amp;ltwsinstallapp profilename="Dev" ear="${output.dir}\TestEar.ear" washome="${local.websphere.path}"&amp;gt&lt;br /&gt;  &amp;lt/wsinstallapp&amp;gt&lt;br /&gt;&amp;lt/target&amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;After installing the application you need to start the application to use that otherwise it's not going to be available.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color:#000099;"&gt;Starting Apllication From Websphere using Ant:&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lttarget name="startApplication" depends="init"&amp;gt&lt;br /&gt;  &amp;ltwsstartapplication server="server1" profilename="Dev" application="TestEar" washome="${local.websphere.path}"&amp;gt&lt;br /&gt;  &amp;lt/wsstartapplication&amp;gt&lt;br /&gt;&amp;lt/target&amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="color:#000099;"&gt;Stopping Apllication From Websphere using Ant:&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lttarget name="stopApplication" depends="init"&amp;gt&lt;br /&gt;  &amp;ltwsstopapplication server="server1" profilename="Dev" application="TestEar" washome="${local.websphere.path}"&amp;gt&lt;br /&gt;  &amp;lt/wsstopapplication&amp;gt&lt;br /&gt;&amp;lt/target&amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you have any problems in using this you can post your comments  I will reply as soon as possible.&lt;br /&gt;&lt;br /&gt;Feel free to email me at venkatsep14@gmail.com&lt;br /&gt;&lt;br /&gt;Good Luck&lt;br /&gt;Venkat&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-8583119125029988286?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=n13_ytjnRPw:DBzG8rloNgc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=n13_ytjnRPw:DBzG8rloNgc:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/n13_ytjnRPw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/n13_ytjnRPw/websphere-61-ant-tasks.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>5</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2008/10/websphere-61-ant-tasks.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-5896555374216960204</guid><pubDate>Tue, 07 Oct 2008 17:12:00 +0000</pubDate><atom:updated>2008-10-07T10:30:04.699-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Integrating DbUnit With Ant</category><category domain="http://www.blogger.com/atom/ns#">DbUnit</category><category domain="http://www.blogger.com/atom/ns#">org.dbunit.ant.DbUnitTask</category><category domain="http://www.blogger.com/atom/ns#">org.slf4j.LoggerFactory</category><title>Problems in Integrating Ant with DbUnit</title><description>&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;Error of the day: &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;taskdef A class needed by class org.dbunit.ant.DbUnitTask cannot be found: org.slf4j.LoggerFactory&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#006600;"&gt;&lt;strong&gt;Solution For this Problem :&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;goto &lt;a href="http://www.slf4j.org/download.html"&gt;http://www.slf4j.org/download.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;And download the zip file and add the following jars to the Ant Runtime.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;How to Add Jar files:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Window--&gt; Preferences --&gt;Ant --&gt;Runtime --&gt; Goto Classpath tab and add the jar files.&lt;br /&gt;&lt;br /&gt;slf4j-simple-1.5.3.jar and slf4j-api-1.5.3.jar&lt;br /&gt;&lt;br /&gt;I hope this will helpfun if anyone has problems. Let me know if it does not solve your problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-5896555374216960204?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=_x1qsh8AldM:zJIc5f5_xmc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=_x1qsh8AldM:zJIc5f5_xmc:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/_x1qsh8AldM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/_x1qsh8AldM/problems-in-integrating-ant-with-dbunit.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>2</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2008/10/problems-in-integrating-ant-with-dbunit.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-5807864808648761019</guid><pubDate>Sun, 11 May 2008 00:50:00 +0000</pubDate><atom:updated>2008-05-10T17:57:56.422-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Left Join fetch</category><category domain="http://www.blogger.com/atom/ns#">Seam framework</category><category domain="http://www.blogger.com/atom/ns#">JPA</category><title>Seam and JPA Entities Left Join Fetch</title><description>JPA Eager fetching differences when finding the object from entity manager and when using the JPQL.&lt;br /&gt;&lt;br /&gt;If you use the Eager fetching for many-one relationships and using the JPQL to get the parent object from the data base.&lt;br /&gt;&lt;br /&gt;It issues two statments&lt;br /&gt;&lt;br /&gt;1. Parent Object Query&lt;br /&gt;2. Child Object Query.&lt;br /&gt;&lt;br /&gt;It's because JPQL will be directly translated into SQL.If you want all the child objects to be loaded in single query just use the&lt;br /&gt;&lt;br /&gt;entityManager.find(User.class,1234);&lt;br /&gt;&lt;br /&gt;And it will fetch all the child objects in Single query using the left outer join.&lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Venkat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-5807864808648761019?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=0Ql0FyNUmlU:7kEz-kGCZ18:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=0Ql0FyNUmlU:7kEz-kGCZ18:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/0Ql0FyNUmlU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/0Ql0FyNUmlU/seam-and-jpa-entities-left-join-fetch.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2008/05/seam-and-jpa-entities-left-join-fetch.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-3872124897041200262</guid><pubDate>Sun, 11 May 2008 00:30:00 +0000</pubDate><atom:updated>2008-05-10T17:35:08.093-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Data Model</category><category domain="http://www.blogger.com/atom/ns#">Seam framework</category><title>Error of the day in using Seam Framework</title><description>Incomplete Deployment Listing : Not able to deploy the application.&lt;br /&gt;&lt;br /&gt;The reason today I get this exception is we can not specify the scope attribute as Conversation for DataModel annotation.&lt;br /&gt;&lt;br /&gt;We can only use UNSPECIFIED and PAGE scope for DataModel in Seam Framework.&lt;br /&gt;&lt;br /&gt; Thanks&lt;br /&gt;Venkat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-3872124897041200262?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=GHJI39ei11Y:_-Y2rtl6_d8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=GHJI39ei11Y:_-Y2rtl6_d8:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/GHJI39ei11Y" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/GHJI39ei11Y/error-of-day-in-using-seam-framework.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2008/05/error-of-day-in-using-seam-framework.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-4257404387192133471</guid><pubDate>Sat, 03 May 2008 21:10:00 +0000</pubDate><atom:updated>2008-05-03T14:20:30.131-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JSF</category><category domain="http://www.blogger.com/atom/ns#">ACEGI</category><category domain="http://www.blogger.com/atom/ns#">Spring</category><category domain="http://www.blogger.com/atom/ns#">Seam framework</category><category domain="http://www.blogger.com/atom/ns#">RichFaces</category><title>Experiencing Seam Framework</title><description>I am exploring the seam framework.I really love the features of Seam mainly Conversation Scope for web application and Bijection.(Bijection is really a good feature we don't need to work with object and keeping them in sesssion or request). Bijection automatically takes care of that work.&lt;br /&gt;&lt;br /&gt;I really love the Seam Security and Seam Email features also.Many application need Security and access controls based on the roles for all of them who need to use security it provides simple integration for security.You just need to implement the authenticate method.Every other aspect is going to take care by Seam.&lt;br /&gt;&lt;br /&gt;With Seam Security integrated into the framework you don't need to fiddle with another security framework like ACEGI.&lt;br /&gt;&lt;br /&gt;And I am trying Seam,JPA and RichFaces.I am going to comeup with many articles on Seam.Seam takes JSF to the next level by providing the bookmarking and post redirect features.&lt;br /&gt;&lt;br /&gt;I tried JSF and Spring framework to implement my project. As I am not able to get more out of JSF I am migrating that to Seam.And Seam provides good integration with Spring Framework also.You can leverage the Business Services which you already developed in Spring.&lt;br /&gt;&lt;br /&gt;Venkat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-4257404387192133471?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=qp3WNziGzLM:DIsEHBVCd2Y:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=qp3WNziGzLM:DIsEHBVCd2Y:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/qp3WNziGzLM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/qp3WNziGzLM/experiencing-seam-framework.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2008/05/experiencing-seam-framework.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-4799850691740636698</guid><pubDate>Fri, 21 Mar 2008 18:53:00 +0000</pubDate><atom:updated>2008-03-21T20:33:28.036-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Spring Framework</category><category domain="http://www.blogger.com/atom/ns#">Spring AOP</category><category domain="http://www.blogger.com/atom/ns#">Spring Transaction Management</category><category domain="http://www.blogger.com/atom/ns#">Spring Example</category><category domain="http://www.blogger.com/atom/ns#">My SQL</category><title>Spring Transaction Management with MYSQL Database</title><description>Background:&lt;br /&gt;&lt;br /&gt;I have written the Spring Transaction Management example using Oracle XE.&lt;br /&gt;&lt;a href="http://j2eeframeworks.blogspot.com/2007/07/spring-20-transaction-management.html"&gt;Previous Example&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Introduction :&lt;br /&gt;&lt;br /&gt;I want to write the same example with MySQL database and all the needed things to run this.&lt;br /&gt;emp.sql file to create the Mysql database&lt;br /&gt;applicationContext.xml for Spring Configuration.&lt;br /&gt;And the interface,implementation and Client Class.&lt;br /&gt;&lt;br /&gt;Emp.sql script :&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;---- Create schema emp--&lt;br /&gt;CREATE DATABASE IF NOT EXISTS emp;USE emp;&lt;br /&gt;---- Definition of table `employee`--&lt;br /&gt;DROP TABLE IF EXISTS `employee`;CREATE TABLE `employee` (  `empno` int(10) unsigned NOT NULL auto_increment,  `empname` varchar(60) NOT NULL,  PRIMARY KEY  (`empno`)) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;&lt;br /&gt;---- Dumping data for table `employee`--&lt;br /&gt;INSERT INTO `employee` (`empno`,`empname`) VALUES  (1,'venkat'), (2,'venkat'), (3,'venkat'), (4,'venkat'), (5,'venkat'), (6,'venkat');&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Execute this script in your My SQL database.It will create a database and the table.&lt;br /&gt;&lt;br /&gt;We will write POJO's now.Just interface and the implementation class.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;package com.cnn.service;&lt;br /&gt;&lt;br /&gt;public interface FinanceService {&lt;br /&gt; void updateEmployees(int [] empids,String name);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And the implementation class..&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;package com.cnn.service;&lt;br /&gt;&lt;br /&gt;import org.apache.commons.dbcp.BasicDataSource;&lt;br /&gt;import org.springframework.jdbc.core.JdbcTemplate;&lt;br /&gt;&lt;br /&gt;public class FinanceServiceImpl  implements FinanceService{&lt;br /&gt;&lt;br /&gt; private JdbcTemplate template = new JdbcTemplate();&lt;br /&gt;&lt;br /&gt; private BasicDataSource dataSource = null;&lt;br /&gt;&lt;br /&gt; public void setDataSource(BasicDataSource datasource) {&lt;br /&gt;  template.setDataSource(datasource);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public void updateEmployees(int[] foo, String name) {&lt;br /&gt;  for (int i = 0; i &lt; foo.length; i++) {&lt;br /&gt;   template.update("update employee set empname='" + name&lt;br /&gt;     + "' where empno=" + foo[i]);&lt;br /&gt;  }&lt;br /&gt;   //template.update("update employee set empna='"+name+"' where empno=4");&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now we will configure our java classes in Spring framework.That's the main advantage of Spring Framework to use Spring framework you don't need to write anything extra we just write our classes and we configure them in the framework.&lt;br /&gt;&lt;br /&gt;Spring framework is a convention not a programming language.We will see the Spring configuration file now.&lt;br /&gt;&lt;br /&gt;applicationContext.xml&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt?xml version="1.0" encoding="UTF-8"?&amp;gt&lt;br /&gt;&amp;ltbeans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt; xmlns:aop="http://www.springframework.org/schema/aop"&lt;br /&gt; xmlns:tx="http://www.springframework.org/schema/tx"&lt;br /&gt; xsi:schemaLocation="http://www.springframework.org/schema/beans&lt;br /&gt;   http://www.springframework.org/schema/beans/spring-beans-2.0.xsd&lt;br /&gt;   http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd&lt;br /&gt;http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"&amp;gt&lt;br /&gt; &amp;lt!-- the transactional advice (i.e. what 'happens'; see the &amp;ltaop:advisor/&amp;gt bean below) --&amp;gt&lt;br /&gt; &amp;lttx:advice id="txAdvice" transaction-manager="txManager"&amp;gt&lt;br /&gt;  &amp;lt!-- the transactional semantics... --&amp;gt&lt;br /&gt;  &amp;lttx:attributes&amp;gt&lt;br /&gt;   &amp;lttx:method name="*" /&amp;gt&lt;br /&gt;  &amp;lt/tx:attributes&amp;gt&lt;br /&gt; &amp;lt/tx:advice&amp;gt &lt;br /&gt;&lt;br /&gt; &amp;lt!-- ensure that the above transactional advice runs for any execution&lt;br /&gt;  of an operation defined by the FinanceService interface --&amp;gt&lt;br /&gt; &amp;ltaop:config&amp;gt&lt;br /&gt;  &amp;ltaop:pointcut id="financeServiceOperation"&lt;br /&gt;   expression="execution(* com.cnn.service.FinanceService.*(..))" /&amp;gt&lt;br /&gt;  &amp;ltaop:advisor advice-ref="txAdvice"&lt;br /&gt;   pointcut-ref="financeServiceOperation" /&amp;gt&lt;br /&gt; &amp;lt/aop:config&amp;gt&lt;br /&gt; &amp;lt!-- similarly, don't forget the PlatformTransactionManager --&amp;gt&lt;br /&gt; &amp;ltbean id="txManager"&lt;br /&gt;  class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&amp;gt&lt;br /&gt;  &amp;ltproperty name="dataSource" ref="dataSource" /&amp;gt&lt;br /&gt; &amp;lt/bean&amp;gt&lt;br /&gt; &amp;ltbean id="dataSource"&lt;br /&gt;  class="org.apache.commons.dbcp.BasicDataSource"&lt;br /&gt;  destroy-method="close"&amp;gt&lt;br /&gt;  &amp;ltproperty name="driverClassName" value="com.mysql.jdbc.Driver" /&amp;gt&lt;br /&gt;  &amp;ltproperty name="url"&lt;br /&gt;   value="jdbc:mysql://localhost:3306/emp" /&amp;gt&lt;br /&gt;  &amp;ltproperty name="username" value="root" /&amp;gt&lt;br /&gt;  &amp;ltproperty name="password" value="owp" /&amp;gt&lt;br /&gt; &amp;lt/bean&amp;gt&lt;br /&gt; &amp;ltbean id="financeService"&lt;br /&gt;  class="com.cnn.service.FinanceServiceImpl"&amp;gt&lt;br /&gt;  &amp;ltproperty name="dataSource" ref="dataSource" /&amp;gt&lt;br /&gt; &amp;lt/bean&amp;gt&lt;br /&gt;&lt;br /&gt;&amp;lt/beans&amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We configured our classes to make available to the spring framework.Now we will write a client program to call these classes.&lt;br /&gt;&lt;br /&gt;Service Client Program :&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;br /&gt;package com.cnn.client;&lt;br /&gt;&lt;br /&gt;import org.springframework.context.ApplicationContext;&lt;br /&gt;import org.springframework.context.support.ClassPathXmlApplicationContext;&lt;br /&gt;&lt;br /&gt;import com.cnn.service.FinanceService;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * @author venkat&lt;br /&gt; *&lt;br /&gt; */&lt;br /&gt;public class ServiceClient {&lt;br /&gt;&lt;br /&gt;  public static void main(String args[]){&lt;br /&gt;  //this is to load all the beans to the container..Container here is ApplicationContext class.&lt;br /&gt;  ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");&lt;br /&gt;  //See here the advantage of Spring framework..we are depending on interfaces in the client..we have a flexibility of changing the implementation class anytime.&lt;br /&gt;  FinanceService service=(FinanceService)context.getBean("financeService");&lt;br /&gt;  int[] empnos={2,3};&lt;br /&gt;  service.updateEmployees(empnos,"venkat");&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now do the following steps.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;And Run the Service Client First -- It will execute Successfully.&lt;br /&gt;&lt;br /&gt;After that Uncomment the following line in FinanceServiceImpl.&lt;br /&gt;&lt;br /&gt;//template.update("update employee set empna='"+name+"' where empno=4");&lt;br /&gt;&lt;br /&gt;Then run the Service Clinet Again it will throw badSQLGrammer Exception.Then Observe It will not update any of the rows.(That menas those three update statements are running in a single transaction.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That's it see how Spring Manages the transactions declaratively.Without writing any transactional statements and with simple java programs.&lt;br /&gt;&lt;br /&gt;If you have any questions send me an email to &lt;a href="mailto:venkatsep14@gmail.com"&gt;venkatsep14@gmail.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Venkat Dulipalli&lt;br /&gt;Sun Certified Java Professional.&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;!--&lt;br /&gt;google_ad_client = "pub-9381301720223691";&lt;br /&gt;/* 468x15, created 3/21/08 */&lt;br /&gt;google_ad_slot = "2768442578";&lt;br /&gt;google_ad_width = 468;&lt;br /&gt;google_ad_height = 15;&lt;br /&gt;//--&gt;&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&lt;br /&gt;src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-4799850691740636698?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=MquvhBjMdlQ:T-tVYD4mR28:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=MquvhBjMdlQ:T-tVYD4mR28:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/MquvhBjMdlQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/MquvhBjMdlQ/spring-transaction-management-with.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2008/03/spring-transaction-management-with.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-3301329977300402358</guid><pubDate>Thu, 23 Aug 2007 20:17:00 +0000</pubDate><atom:updated>2008-03-21T20:34:25.028-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">String Sorting Gotchas in Java.</category><category domain="http://www.blogger.com/atom/ns#">Sorting</category><category domain="http://www.blogger.com/atom/ns#">String Comparision in Java</category><category domain="http://www.blogger.com/atom/ns#">String Comparision</category><category domain="http://www.blogger.com/atom/ns#">String Sorting</category><category domain="http://www.blogger.com/atom/ns#">Sorting in Java</category><title>String Sorting in Java</title><description>Hi Everybody,&lt;br /&gt;&lt;br /&gt;you all may think that to compare the string we have compareTo method.But it does not work as we expect.If you want to compare the strings we have to use the Collator class.&lt;br /&gt;&lt;br /&gt;I just spend a lot of time on this that's why I just blogged this to save the time for atleast who read this.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Collator colltor=Collator.getInstance();&lt;br /&gt;int i=colltor.compare("a3","c1");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If you want to use this to sort some list of person objects data which has to be sorted by name then you can use the following code in the comparator.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public class NameComparator implements Comparator&lt;person&gt;{&lt;br /&gt;public int compare(Person o1,Person o2){&lt;br /&gt;Collator colltor=Collator.getInstance();&lt;br /&gt;return colltor.compare(o1.getName(),o2.getName());&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the client class you can use&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Collections.sort(list,new NameComparator());&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It will sort the person objects in the list by name of that person.&lt;br /&gt;&lt;br /&gt;Venkat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-3301329977300402358?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=zVuVAlTHjEs:1l0RKuJNNGY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=zVuVAlTHjEs:1l0RKuJNNGY:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/zVuVAlTHjEs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/zVuVAlTHjEs/string-sorting-in-java.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2007/08/string-sorting-in-java.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-2039610252006078662</guid><pubDate>Mon, 13 Aug 2007 21:15:00 +0000</pubDate><atom:updated>2007-08-13T14:24:03.700-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">StringBuffer and StringBuilder Comparision.</category><title>Java 5.0 StringBuilder and StringBuffer</title><description>Hi Everybody,&lt;br /&gt;&lt;br /&gt;We all use &lt;span style="color:#3366ff;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;StringBuffer&lt;/span&gt;&lt;/span&gt; instead of String Concatenation till Java 1.4.Another class is introduced in Java5.0 same as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;StringBuffer&lt;/span&gt; implementation with more performance.That means they implemented the class without synchronization methods.&lt;br /&gt;&lt;br /&gt;If Thread safety is not an issue then you guys can use &lt;strong&gt;&lt;span style="color:#3366ff;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;StringBuilder&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt; instead of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;StringBuffer&lt;/span&gt;..it &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;offers&lt;/span&gt; more performance because it is not synchronized.It offers all methods &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;which&lt;/span&gt; are in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;StringBuffer&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;Venkat&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-2039610252006078662?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=HL2kQW4acMA:Zt17x5heUF4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=HL2kQW4acMA:Zt17x5heUF4:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/HL2kQW4acMA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/HL2kQW4acMA/java-50-stringbuilder-and-stringbuffer.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2007/08/java-50-stringbuilder-and-stringbuffer.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-6229839374051060992</guid><pubDate>Thu, 09 Aug 2007 20:59:00 +0000</pubDate><atom:updated>2008-03-20T20:47:25.420-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Spring Transactions</category><category domain="http://www.blogger.com/atom/ns#">Spring Hibernate Integration</category><category domain="http://www.blogger.com/atom/ns#">Spring Example</category><category domain="http://www.blogger.com/atom/ns#">Hibernate Example</category><category domain="http://www.blogger.com/atom/ns#">Spring</category><category domain="http://www.blogger.com/atom/ns#">Hibernate</category><category domain="http://www.blogger.com/atom/ns#">Spring Hibernate Integration Examples</category><title>Spring Hibernate Integration</title><description>Hi Everybody, &lt;br /&gt;&lt;br /&gt;In my previous article I talked about the Spring Transaction Management.&lt;br /&gt;Here I want to explain you how to use the Spring Transaction Management with Hibernate. I will split this into three parts.&lt;br /&gt;• Develop Hibernate Application&lt;br /&gt;• Using hibernate with Spring Framework.&lt;br /&gt;• Running the Example Application.&lt;br /&gt;&lt;br /&gt;Develop Hibernate Application:&lt;br /&gt;Setup of Hibernate:&lt;br /&gt;&lt;br /&gt;Download Hibernate from here &lt;br /&gt;It will give you Hibernate 3.2.5 zip file and extract that zip file to C:/Hibernate.&lt;br /&gt;&lt;br /&gt;Start with Hibernate Example:&lt;br /&gt;&lt;br /&gt;First Class: Group. java – Our first persistent class is a simple JavaBean class with some properties. In the next step we will tell hibernate to persist this class. &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;package info.j2eeexamples.hibernate;&lt;br /&gt;import java.io.Serializable;&lt;br /&gt;import java.util.Date;&lt;br /&gt;import java.util.Set;&lt;br /&gt;import org.apache.commons.lang.builder.ToStringBuilder;&lt;br /&gt;&lt;br /&gt;/** @author Venkat. Dulipalli */&lt;br /&gt;public class Group implements Serializable {&lt;br /&gt;&lt;br /&gt;    /** identifier field */&lt;br /&gt;    private Long id;&lt;br /&gt;&lt;br /&gt;    /** nullable persistent field */&lt;br /&gt;    private String groupName;&lt;br /&gt;&lt;br /&gt;    /** nullable persistent field */&lt;br /&gt;    private String groupDescription;&lt;br /&gt;&lt;br /&gt;    /** nullable persistent field */&lt;br /&gt;    private Double createdBy;&lt;br /&gt;&lt;br /&gt;    /** nullable persistent field */&lt;br /&gt;    private Date creationDate;&lt;br /&gt;&lt;br /&gt;    /** nullable persistent field */&lt;br /&gt;    private Double modifiedBy;&lt;br /&gt;&lt;br /&gt;    /** nullable persistent field */&lt;br /&gt;    private Date modificationDate;&lt;br /&gt;&lt;br /&gt;    /** nullable persistent field */&lt;br /&gt;    private Double deletedBy;&lt;br /&gt;&lt;br /&gt;    /** nullable persistent field */&lt;br /&gt;    private Date deleteDate;&lt;br /&gt;    &lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;    /** full constructor */&lt;br /&gt;    public Group(String groupName, String groupDescription, Double createdBy, Date creationDate, Double modifiedBy, Date modificationDate, Double deletedBy, Date deleteDate,Set properties) {&lt;br /&gt;        this.groupName = groupName;&lt;br /&gt;        this.groupDescription = groupDescription;&lt;br /&gt;        this.createdBy = createdBy;&lt;br /&gt;        this.creationDate = creationDate;&lt;br /&gt;        this.modifiedBy = modifiedBy;&lt;br /&gt;        this.modificationDate = modificationDate;&lt;br /&gt;        this.deletedBy = deletedBy;&lt;br /&gt;        this.deleteDate = deleteDate;&lt;br /&gt;        &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /** default constructor */&lt;br /&gt;    public Group() {&lt;br /&gt;    }&lt;br /&gt;    /** minimal constructor */&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;    public Long getId() {&lt;br /&gt;        return this.id;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setId(Long id) {&lt;br /&gt;        this.id = id;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getGroupName() {&lt;br /&gt;        return this.groupName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setGroupName(String groupName) {&lt;br /&gt;        this.groupName = groupName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getGroupDescription() {&lt;br /&gt;        return this.groupDescription;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setGroupDescription(String groupDescription) {&lt;br /&gt;        this.groupDescription = groupDescription;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Double getCreatedBy() {&lt;br /&gt;        return this.createdBy;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setCreatedBy(Double createdBy) {&lt;br /&gt;        this.createdBy = createdBy;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Date getCreationDate() {&lt;br /&gt;        return this.creationDate;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setCreationDate(Date creationDate) {&lt;br /&gt;        this.creationDate = creationDate;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Double getModifiedBy() {&lt;br /&gt;        return this.modifiedBy;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setModifiedBy(Double modifiedBy) {&lt;br /&gt;        this.modifiedBy = modifiedBy;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Date getModificationDate() {&lt;br /&gt;        return this.modificationDate;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setModificationDate(Date modificationDate) {&lt;br /&gt;        this.modificationDate = modificationDate;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Double getDeletedBy() {&lt;br /&gt;        return this.deletedBy;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setDeletedBy(Double deletedBy) {&lt;br /&gt;        this.deletedBy = deletedBy;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Date getDeleteDate() {&lt;br /&gt;        return this.deleteDate;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setDeleteDate(Date deleteDate) {&lt;br /&gt;        this.deleteDate = deleteDate;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String toString() {&lt;br /&gt;        return new ToStringBuilder(this)&lt;br /&gt;            .append("id", getId())&lt;br /&gt;            .toString();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hibernate needs to know how to load and store objects of the persistent class. This is where the Hibernate mapping file comes into play. The mapping file tells Hibernate what table in the database it has to access, and what columns in that table it should use.&lt;br /&gt;&lt;br /&gt;Group.hbm.xml&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt?xml version="1.0" encoding="UTF-8"?&amp;gt&lt;br /&gt;&amp;lt!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&amp;gt&lt;br /&gt;&amp;lthibernate-mapping&amp;gt&lt;br /&gt;&amp;ltclass name="org.applabs.base.Group" table="GROUP_MS"&amp;gt&lt;br /&gt;&amp;ltid column="GROUP_ID" name="id" type="java.lang.Long"&amp;gt&lt;br /&gt; &amp;ltgenerator class="assigned"/&amp;gt  &lt;br /&gt;&amp;lt/id&amp;gt&lt;br /&gt;&amp;ltproperty column="GROUP_NAME" name="groupName" type="java.lang.String"/&amp;gt&lt;br /&gt;&amp;ltproperty column="GROUP_DESCRIPTION" name="groupDescription" type="java.lang.String"/&amp;gt&lt;br /&gt;&amp;ltproperty column="CREATED_BY" length="65535" name="createdBy" type="java.lang.Double"/&amp;gt&lt;br /&gt;&amp;ltproperty column="CREATION_DATE" length="4" name="creationDate" type="java.util.Date"/&amp;gt&lt;br /&gt;&lt;br /&gt;&amp;ltproperty column="MODIFIED_BY" length="65535" name="modifiedBy" type="java.lang.Double"/&amp;gt&lt;br /&gt;&amp;ltproperty column="MODIFICATION_DATE" length="4" name="modificationDate" type="java.util.Date"/&amp;gt&lt;br /&gt;&amp;ltproperty column="DELETED_BY" length="65535" name="deletedBy" type="java.lang.Double"/&amp;gt&lt;br /&gt;&amp;ltproperty column="DELETE_DATE" length="4" name="deleteDate" type="java.util.Date"/&amp;gt&lt;br /&gt;&lt;br /&gt;&amp;lt/class&amp;gt&lt;br /&gt;&amp;lt/hibernate-mapping&amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We continue with the main configuration of Hibernate&lt;br /&gt;&lt;br /&gt;Hibernate Configuration – Hibernate.cfg.xml&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt?xml version="1.0" encoding="UTF-8"?&amp;gt&lt;br /&gt;&amp;lt!DOCTYPE hibernate-configuration PUBLIC&lt;br /&gt;"-//Hibernate/Hibernate Configuration DTD 3.0//EN"&lt;br /&gt;"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"&amp;gt&lt;br /&gt;&lt;br /&gt;&amp;lthibernate-configuration&amp;gt&lt;br /&gt;&amp;ltsession-factory&amp;gt&lt;br /&gt;    &amp;ltproperty name="show_sql"&amp;gttrue&amp;lt/property&amp;gt&lt;br /&gt;  &lt;br /&gt;    &amp;ltproperty name="hibernate.dialect"&amp;gtorg.hibernate.dialect.SQLServerDialect&amp;lt/property&amp;gt&lt;br /&gt;    &amp;ltproperty name="hibernate.connection.driver_class"&amp;gtcom.microsoft.jdbc.sqlserver.SQLServerDriver&amp;lt/property&amp;gt&lt;br /&gt;    &amp;ltproperty name="hibernate.connection.url"&amp;gtjdbc:microsoft:sqlserver://localhost:1433;user=dbo;DatabaseName=user;SelectMethod=cursor&amp;lt/property&amp;gt&lt;br /&gt;    &amp;ltproperty name="hibernate.connection.username"&amp;gtsa&amp;lt/property&amp;gt&lt;br /&gt;    &amp;ltproperty name="hibernate.connection.password"&amp;gtvenkat&amp;lt/property&amp;gt&lt;br /&gt;    &amp;ltmapping resource="info/j2eeexamples/hibernate/Group.hbm.xml"/&amp;gt &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;&amp;lt/session-factory&amp;gt&lt;br /&gt;&amp;lt/hibernate-configuration&amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;We are done with the configuration stuff now we will look into how to insert data into a table using Hibernate.&lt;br /&gt;We will start with HibernateGroup class as standalone Java application.&lt;br /&gt;&lt;br /&gt;HibernateGroup.java&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import java.util.Calendar;&lt;br /&gt;import java.util.HashSet;&lt;br /&gt;import java.util.Iterator;&lt;br /&gt;import java.util.List;&lt;br /&gt;import java.util.Set;&lt;br /&gt;&lt;br /&gt;import org.hibernate.Query;&lt;br /&gt;import org.hibernate.Session;&lt;br /&gt;import org.hibernate.Transaction;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * @author venkat.dulipalli&lt;br /&gt; *&lt;br /&gt; * TODO To change the template for this generated type comment go to&lt;br /&gt; * Window - Preferences - Java - Code Style - Code Templates&lt;br /&gt; */&lt;br /&gt;public class HibernateGroup {&lt;br /&gt;    &lt;br /&gt;    /** Creates a new instance of AppLibMain */&lt;br /&gt;    public HibernateGroup() {&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;     * @param args the command line arguments&lt;br /&gt;     */&lt;br /&gt;    public static void main(String[] args)throws Exception {&lt;br /&gt;        // TODO code application logic here&lt;br /&gt;        HibernateGroup hibernate = new HibernateGroup ();&lt;br /&gt;        hibernate.runInsertForGroup();&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt; &lt;br /&gt;    &lt;br /&gt;    /**&lt;br /&gt;  * &lt;br /&gt;  */&lt;br /&gt; private void runInsertForGroup() {&lt;br /&gt;  // TODO Auto-generated method stub&lt;br /&gt;  Session session = HibernateUtils.currentSession();&lt;br /&gt;        Transaction  tx = session.getTransaction();&lt;br /&gt;        tx.begin();&lt;br /&gt;        Group group=new Group();&lt;br /&gt;        group.setCreatedBy(new Double(3));&lt;br /&gt;        group.setCreationDate(Calendar.getInstance().getTime());&lt;br /&gt;        group.setGroupDescription("This is DummyGroup");&lt;br /&gt;        group.setGroupName("Hibernate Discussion Group");&lt;br /&gt;        group.setId(new Long(1109));&lt;br /&gt;        GroupProp prop=new GroupProp();&lt;br /&gt;        prop.setGroupId(new Long(1109));&lt;br /&gt;        prop.setId(new Long(1002));&lt;br /&gt;        prop.setPropName("Extra3");&lt;br /&gt;        prop.setPropValue("Extra3");&lt;br /&gt;        prop.setPropValueDetails("Extra Details3");&lt;br /&gt;        session.save(group);&lt;br /&gt;        tx.commit();&lt;br /&gt;        &lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Using hibernate with Spring Framework.&lt;br /&gt;&lt;br /&gt;In the above example you will see you are manually starting the transaction and ending the transaction. We used programmatic transactions in this example.&lt;br /&gt;&lt;br /&gt;How it would be if you can use the declarative transaction management with Hibernate. We can do that by using the Spring Framework.&lt;br /&gt;&lt;br /&gt;I am going to use the Spring Framework declarative transactions with the same Hibernate example.&lt;br /&gt;&lt;br /&gt;We will start with the code...&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;/*&lt;br /&gt; * Created on Jul 31, 2007&lt;br /&gt; *&lt;br /&gt; * TODO To change the template for this generated file go to&lt;br /&gt; * Window - Preferences - Java - Code Style - Code Templates&lt;br /&gt; */&lt;br /&gt;package info.j2eeexamples.hibernate;&lt;br /&gt;&lt;br /&gt;import info.j2eeexamples.hibernate.Group;&lt;br /&gt;import org.hibernate.SessionFactory;&lt;br /&gt;import org.springframework.orm.hibernate3.HibernateTemplate;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * @author venkat.dulipalli&lt;br /&gt; *&lt;br /&gt; * TODO To change the template for this generated type comment go to&lt;br /&gt; * Window - Preferences - Java - Code Style - Code Templates&lt;br /&gt; */&lt;br /&gt;public class GroupDAO {&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * &lt;br /&gt;  */&lt;br /&gt; public GroupDAO() {&lt;br /&gt;  super();&lt;br /&gt;  // TODO Auto-generated constructor stub&lt;br /&gt; }&lt;br /&gt; private HibernateTemplate template;&lt;br /&gt; private SessionFactory sessionFactory;&lt;br /&gt; &lt;br /&gt; public void save(Group group){&lt;br /&gt;  template.save(group);&lt;br /&gt;   &lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * @return Returns the sessionFactory.&lt;br /&gt;  */&lt;br /&gt; public SessionFactory getSessionFactory() {&lt;br /&gt;  return sessionFactory;&lt;br /&gt; }&lt;br /&gt; /**&lt;br /&gt;  * @param sessionFactory The sessionFactory to set.&lt;br /&gt;  */&lt;br /&gt; public void setSessionFactory(SessionFactory sessionFactory) {&lt;br /&gt;  template = new HibernateTemplate(sessionFactory);&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;                    &lt;br /&gt;We will configure spring now to use with this app.&lt;br /&gt;&lt;br /&gt;Spring2Beans.xml&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt!-- from the file 'context.xml' --&amp;gt&lt;br /&gt;&amp;ltbeans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;       xmlns:aop="http://www.springframework.org/schema/aop"&lt;br /&gt;       xmlns:tx="http://www.springframework.org/schema/tx"&lt;br /&gt;       xsi:schemaLocation="&lt;br /&gt;       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd&lt;br /&gt;       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd&lt;br /&gt;       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"&amp;gt&lt;br /&gt;  &lt;br /&gt;  &amp;lt!-- this is the service object that we want to make transactional --&amp;gt&lt;br /&gt;    &amp;ltbean id="groupDAO" class=" info.j2eeexamples.hibernate.GroupDAO"&amp;gt&lt;br /&gt;   &amp;ltproperty name="sessionFactory" ref="mySessionFactory" /&amp;gt&lt;br /&gt;  &amp;lt/bean&amp;gt&lt;br /&gt;  &lt;br /&gt;  &amp;lttx:advice id="txAdvice" transaction-manager="txManager"&amp;gt&lt;br /&gt;    &amp;lt!-- the transactional semantics... --&amp;gt&lt;br /&gt;    &amp;lttx:attributes&amp;gt&lt;br /&gt;      &amp;lt!-- all methods starting with 'get' are read-only --&amp;gt&lt;br /&gt;      &amp;lttx:method name="save*" /&amp;gt&lt;br /&gt;      &amp;lt!-- other methods use the default transaction settings (see below) --&amp;gt&lt;br /&gt;      &amp;lttx:method name="*"/&amp;gt&lt;br /&gt;    &amp;lt/tx:attributes&amp;gt&lt;br /&gt;  &amp;lt/tx:advice&amp;gt&lt;br /&gt;  &lt;br /&gt; &lt;br /&gt;  &amp;ltaop:config&amp;gt&lt;br /&gt;    &amp;ltaop:pointcut id="groupDAOOperation" expression="execution(*info.j2eeexamples.hibernate.GroupDAO.*(..))"/&amp;gt&lt;br /&gt;    &amp;ltaop:advisor advice-ref="txAdvice" pointcut-ref="groupDAOOperation"/&amp;gt&lt;br /&gt;  &amp;lt/aop:config&amp;gt&lt;br /&gt;  &lt;br /&gt;  &amp;lt!-- don't forget the DataSource --&amp;gt&lt;br /&gt;  &amp;ltbean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&amp;gt&lt;br /&gt;   &amp;ltproperty name="driverClassName" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/&amp;gt&lt;br /&gt;        &amp;ltproperty name="url" value="jdbc:microsoft:sqlserver://localhost:1433;user=dbo;DatabaseName=user;SelectMethod=cursor"/&amp;gt&lt;br /&gt;        &amp;ltproperty name="username" value="sa"/&amp;gt&lt;br /&gt;        &amp;ltproperty name="password" value="venkat"/&amp;gt&lt;br /&gt;  &amp;lt/bean&amp;gt&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;  &amp;lt!-- This is for Hibernate --&amp;gt&lt;br /&gt;  &amp;ltbean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"&amp;gt&lt;br /&gt;    &amp;ltproperty name="sessionFactory" ref="mySessionFactory"/&amp;gt&lt;br /&gt;  &amp;lt/bean&amp;gt&lt;br /&gt;  &lt;br /&gt;  &amp;ltbean id="mySessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&amp;gt&lt;br /&gt;    &amp;ltproperty name="dataSource" ref="dataSource"/&amp;gt&lt;br /&gt;    &amp;ltproperty name="mappingResources"&amp;gt&lt;br /&gt;      &amp;ltlist&amp;gt&lt;br /&gt;        &amp;ltvalue&amp;gtinfo/j2eeexamples/hibernate/Group.hbm.xml&amp;lt/value&amp;gt&lt;br /&gt;      &amp;lt/list&amp;gt&lt;br /&gt;    &amp;lt/property&amp;gt&lt;br /&gt;    &amp;ltproperty name="hibernateProperties"&amp;gt&lt;br /&gt;      &amp;ltvalue&amp;gt&lt;br /&gt;        hibernate.dialect=org.hibernate.dialect.SQLServerDialect&lt;br /&gt;      &amp;lt/value&amp;gt&lt;br /&gt;    &amp;lt/property&amp;gt&lt;br /&gt;  &amp;lt/bean&amp;gt&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  &amp;lt!-- other &amp;ltbean/&amp;gt definitions here --&amp;gt&lt;br /&gt;&lt;br /&gt;&amp;lt/beans&amp;gt&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we are done with the spring configuration. We will write a client for Spring DAO now.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;/*&lt;br /&gt; * Created on Apr 24, 2007&lt;br /&gt; *&lt;br /&gt; * TODO To change the template for this generated file go to&lt;br /&gt; * Window - Preferences - Java - Code Style - Code Templates&lt;br /&gt; */&lt;br /&gt;package info.j2eeexamples.hibernate.utils;&lt;br /&gt;&lt;br /&gt;import java.util.Calendar;&lt;br /&gt;import java.util.HashSet;&lt;br /&gt;import java.util.Set;&lt;br /&gt;&lt;br /&gt;import info.j2eeexamples.hibernate.Group;&lt;br /&gt;import info.j2eeexamples.hibernate.GroupProp;&lt;br /&gt;import info.j2eeexamples.hibernate.GroupDAO;&lt;br /&gt;import org.springframework.context.ApplicationContext;&lt;br /&gt;import org.springframework.context.support.ClassPathXmlApplicationContext;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * @author venkat.dulipalli&lt;br /&gt; *&lt;br /&gt; * TODO To change the template for this generated type comment go to&lt;br /&gt; * Window - Preferences - Java - Code Style - Code Templates&lt;br /&gt; */&lt;br /&gt;public class SpringJdbcTest {&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * &lt;br /&gt;  */&lt;br /&gt; public SpringJdbcTest() {&lt;br /&gt;  super();&lt;br /&gt;  // TODO Auto-generated constructor stub&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public static void main(String[] args) {&lt;br /&gt;ApplicationContext context=new ClassPathXmlApplicationContext("spring2beans.xml");&lt;br /&gt;  GroupDAO dao=(GroupDAO)context.getBean("groupDAO");&lt;br /&gt;  Group group=new Group();&lt;br /&gt;        group.setCreatedBy(new Double(3));&lt;br /&gt;        group.setCreationDate(Calendar.getInstance().getTime());&lt;br /&gt;        group.setGroupDescription("This is DummyGroup");&lt;br /&gt;        group.setGroupName("Hibernate Discussion Group");&lt;br /&gt;        group.setId(new Long(1115));&lt;br /&gt;        dao.save(group);&lt;br /&gt;  &lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now you can run this client application directly. See the Group DAO we don’t need to maintain the transactions programmatically.&lt;br /&gt;&lt;br /&gt;Running the Application:&lt;br /&gt;&lt;br /&gt;To run this application you need the following software&lt;br /&gt;&lt;br /&gt;Download Spring Framework with Dependencies zip file.&lt;br /&gt;&lt;br /&gt;Download here Spring2.0&lt;br /&gt;Download Hibernate from here &lt;br /&gt;Download Eclipse here&lt;br /&gt;&lt;br /&gt;Open Eclipse  Create a workspace as D:/javaapps/j2eeworkspace&lt;br /&gt;After opening the eclipse create a java Project with src and classes folder. Add the lib and config folder. To put the libraries and configuration files respectively.&lt;br /&gt;&lt;br /&gt;Copy the spring2Beans.xml and hibernate.cfg.xml to config folder. copy the following jar files from Hibernate/lib &lt;br /&gt;antlr.jar&lt;br /&gt;  cglib.jar&lt;br /&gt;  asm.jar&lt;br /&gt;  asm-attrs.jars&lt;br /&gt;  commons-collections.jar&lt;br /&gt;  commons-logging.jar&lt;br /&gt;  hibernate3.jar&lt;br /&gt;  jta.jar&lt;br /&gt;  dom4j.jar&lt;br /&gt;&lt;br /&gt;to the lib folder. And copy the following jar files from spring/lib &lt;br /&gt;spring.jar&lt;br /&gt;springagent.jar&lt;br /&gt;springaop.jar&lt;br /&gt;springaspects.jar.&lt;br /&gt;&lt;br /&gt;And try to run the application It will run successfully..&lt;br /&gt;If you have any problems mail me at venkatsep14@gmail.com&lt;br /&gt;&lt;br /&gt;Venkat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-6229839374051060992?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=fT8MTDPt6tI:G5u7aT-AcDw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=fT8MTDPt6tI:G5u7aT-AcDw:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/fT8MTDPt6tI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/fT8MTDPt6tI/spring-hibernate-integration.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>6</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2007/08/spring-hibernate-integration.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-4645831323400860051</guid><pubDate>Fri, 13 Jul 2007 20:41:00 +0000</pubDate><atom:updated>2008-03-20T21:01:40.136-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Spring AOP</category><category domain="http://www.blogger.com/atom/ns#">Spring 2.0</category><category domain="http://www.blogger.com/atom/ns#">Spring Transaction Management</category><category domain="http://www.blogger.com/atom/ns#">Transactions</category><title>Spring 2.0 Transaction Management Example</title><description>Hi Everybody,&lt;br /&gt;&lt;br /&gt;In my previous blogs I have given a link for the presentation on Namespaces in Spring.Here I am going to show you an example on one of the predefined namespaces in Spring 2.0.&lt;br /&gt;&lt;br /&gt;I am going to use &lt;span style="color:#3366ff;"&gt;tx&lt;/span&gt; and &lt;span style="color:#3366ff;"&gt;aop&lt;/span&gt; namespaces for the TransactionManagement example.&lt;br /&gt;Prerequisites to run this example are :&lt;br /&gt;&lt;br /&gt;Spring Framework -- Download the Spring Framework with all dependencies.&lt;br /&gt;Java 5.0&lt;br /&gt;commons-dbcp.jar&lt;br /&gt;aspectjrt.jar&lt;br /&gt;aspectjweaver.jar. These two jars available in the Spring lib folder.&lt;br /&gt;Database : OracleXE and it should has employee table with empno and empname as fields.&lt;br /&gt;&lt;br /&gt;Writing the FinanceService and FinanceServiceImpl classes :&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;FinanceService :&lt;/span&gt;&lt;br /&gt;&lt;pre&gt; &lt;br /&gt;package com.cnn.service;&lt;br /&gt;public interface FinanceService {&lt;br /&gt;void updateEmployees(int [] empids,String name);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;FinanceServiceImpl :&lt;/span&gt;&lt;br /&gt;package com.cnn.service;&lt;br /&gt;public class FinanceServiceImpl extends implements FinanceService{&lt;br /&gt;&lt;br /&gt;private JdbcTemplate template=new JdbcTemplate();&lt;br /&gt;&lt;br /&gt;private BasicDataSource dataSource=null;&lt;br /&gt;&lt;br /&gt;public void setDataSource(BasicDataSource datasource){&lt;br /&gt;template.setDataSource(datasource);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;updateEmployees(int[] foo,String name) {&lt;br /&gt;for(int i=0;i &lt; foo.length;i++){&lt;br /&gt;template.update("update employee set empname='"+name+"' where empid="+foo[i]);&lt;br /&gt;}&lt;br /&gt;//template.update("update employee set empna='"+name+"' where empid=3");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here in this implementaion class I used the JdbcTemplate to get rid of checked exceptions.Because JdbcTemplate is going to catch all checked exceptions and throws runtime exceptions.The adavantages of runtime exceptions here is if any runtime exception occured then the transaction is going to rollback automatically.&lt;br /&gt;&lt;br /&gt;Spring has capability of rollback the transaction in case of checked exceptions also..for that we need to configure the spring beans.xml.I am going to cover this in my next article.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:+0;"&gt;&lt;span style="color:#3366ff;"&gt;SpringBeans.xml :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;ltbeans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xmlns:aop="http://www.springframework.org/schema/aop"&lt;br /&gt;xmlns:tx="http://www.springframework.org/schema/tx"&lt;br /&gt;xsi:schemaLocation="&lt;br /&gt;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd&lt;br /&gt;http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd&lt;br /&gt;http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"&amp;gt&lt;br /&gt;&lt;br /&gt;This namespace configuration makes the TransactionManagement simple in Spring 2.0.See the below block of xml to configure the transactions.&lt;br /&gt;&lt;br /&gt;This tx:advice will take the aop advice reference and execute that ponitcut.&lt;br /&gt;&lt;br /&gt;&amp;lttx:advice id="txAdvice" manager="txManager"&amp;gt&lt;br /&gt;&lt;br /&gt;&amp;lttx:attributes&amp;gt&lt;br /&gt;&lt;br /&gt;&amp;lttx:method name="update*" only="true"&amp;gt&lt;br /&gt;&lt;br /&gt;&amp;lttx:method name="*"&amp;gt&lt;br /&gt;&amp;lttx:attributes&amp;gt&lt;br /&gt;&amp;lt/tx:advice&amp;gt&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From the expression in the pointcut container executes that task on all the methods&lt;br /&gt;&lt;br /&gt;&amp;ltaop:config&amp;gt&lt;br /&gt;&amp;ltaop:pointcut id="financeServiceOperation" expression="execution(* com.cnn.service.FinanceService.*(..))"&gt; -- If you want you can mention the method name also..* refers to all the methods in that interface&lt;br /&gt;&amp;ltaop:advisor ref="txAdvice" ref="financeServiceOperation"&amp;gt&lt;br /&gt;&amp;lt/aop:config&amp;gt&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;ltbean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" method="close"&amp;gt&lt;br /&gt;&amp;ltproperty name="driverClassName" value="oracle.jdbc.driver.OracleDriver"&amp;gt&lt;br /&gt;&amp;ltproperty name="url" value="jdbc:oracle:thin:@localhost:1521:XE"&amp;gt&lt;br /&gt;&amp;ltproperty name="username" value="system"&amp;gt&lt;br /&gt;&amp;ltproperty name="password" value="oracle"&amp;gt&lt;br /&gt;&amp;lt/bean&amp;gt&lt;br /&gt;&amp;ltbean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&amp;gt&lt;br /&gt;&amp;ltproperty name="dataSource" ref="dataSource"&amp;gt&lt;br /&gt;&amp;lt/bean&amp;gt&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;ltbean id="financialService" class="com.cnn.service.FinanceServiceImpl"&amp;gt&lt;br /&gt;&amp;ltproperty name="dataSource" ref="dataSource"&amp;gt&lt;br /&gt;&amp;ltbean&amp;gt&lt;br /&gt;&amp;lt/beans&amp;gt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now we are done with the java code and the configuration file.Now I am going to write the client for this service.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;public class Client{&lt;br /&gt;public static void main(String args[]){&lt;br /&gt;//this is to load all the beans to the container..Container here is ApplicationContext class.&lt;br /&gt;ApplicationContext context=new ClassPathXmlApplicationContext("spring2beans.xml");&lt;br /&gt;//See here the advantage of Spring framework..we are depending on interfaces in the client..we have a flexibility of changing the implementation class anytime.&lt;br /&gt;FinanaceService service=(FinanceService)context.getBean("fooService");&lt;br /&gt;int[] empnos={2,3}&lt;br /&gt;service.update(empnos,"Venkat");&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Run the client for the first time..It is going to be succeded.Now uncomment the commented code in the update method of FinanceServiceImpl class.&lt;br /&gt;&lt;br /&gt;Change the parameters in the client&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;service.update(empnos,"Dulipalla");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now the transaction is going to rollback..because the second sql update statement is wrong..and it will throw BadSqlGrammerException which is thrown by JdbcTemplate.&lt;br /&gt;See the code does not have the transaction related code and we are maintaining the transactions declaratively without App Server..See how easy using Spring AOP for transactions.&lt;br /&gt;If you have any doubts feel free to mail me at &lt;a href="mailto:venkatsep14@gmail.com"&gt;venkatsep14@gmail.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Venkat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-4645831323400860051?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=g3Y-ZV-og2Y:BX9GxlCL_F0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=g3Y-ZV-og2Y:BX9GxlCL_F0:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/g3Y-ZV-og2Y" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/g3Y-ZV-og2Y/spring-20-transaction-management.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>2</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2007/07/spring-20-transaction-management.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-2232855889423243445</guid><pubDate>Thu, 12 Jul 2007 15:59:00 +0000</pubDate><atom:updated>2007-07-12T09:19:37.209-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Transaction in EJB 3.0</category><category domain="http://www.blogger.com/atom/ns#">EJB 3.0</category><category domain="http://www.blogger.com/atom/ns#">Spring Framework</category><category domain="http://www.blogger.com/atom/ns#">Transactions in Spring Framework</category><category domain="http://www.blogger.com/atom/ns#">Transactions</category><title>Transaction Management Design Strategies</title><description>Hi Everybody,&lt;br /&gt;&lt;br /&gt;Mark Richards explained how to implement the Transaction Starategies in EJB and Spring Framework.&lt;br /&gt;&lt;br /&gt;You can download the book by registering to the infoq.&lt;br /&gt;&lt;br /&gt;I read many specifications to understand  transactions better.But this book has covered all the aspects to implement the transaction in your applications.&lt;br /&gt;&lt;br /&gt;Main points covered in his book are :&lt;br /&gt;&lt;br /&gt;1. Programmatic Transactions&lt;br /&gt;2. Declarative Transactions&lt;br /&gt;3. XA Transacations&lt;br /&gt;&lt;br /&gt;Using Both EJB 3.0 and Spring Framework.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.infoq.com/minibooks/JTDS"&gt;Click here to download&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Venkat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-2232855889423243445?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=KETmaCoT5Bg:VkCK5E-Xu1w:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=KETmaCoT5Bg:VkCK5E-Xu1w:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/KETmaCoT5Bg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/KETmaCoT5Bg/transaction-management-design.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2007/07/transaction-management-design.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-770663128089654218</guid><pubDate>Wed, 11 Jul 2007 18:40:00 +0000</pubDate><atom:updated>2007-07-11T12:34:07.511-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Spring 2.0 Custom Namespaces</category><category domain="http://www.blogger.com/atom/ns#">Spring 2.0</category><title>Spring 2.0 Namespaces</title><description>Hi All,&lt;br /&gt;&lt;br /&gt;If you are interested in exploring the namespaces in Spring 2.0 and writing your custom namespaces check the following articles.&lt;br /&gt;&lt;a href="http://www.chariotsolutions.com/slides/spring-forward-2006-xml-config.pdf"&gt;Spring Name Spaces&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Aravindan Ramkumar has written a good article on writing custome NameSpaces&lt;br /&gt;&lt;a href="http://www.theserverside.com/tt/articles/article.tss?l=CustomNamespacesSpring2"&gt;Spring Custom Namespaces&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Venkat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-770663128089654218?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=81sRjnlbZ_w:SN9Oa2bXpno:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=81sRjnlbZ_w:SN9Oa2bXpno:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/81sRjnlbZ_w" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/81sRjnlbZ_w/spring-20-namespaces.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2007/07/spring-20-namespaces.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-8724236446113773660</guid><pubDate>Wed, 11 Jul 2007 18:21:00 +0000</pubDate><atom:updated>2007-07-12T08:43:08.524-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Spring2.0</category><category domain="http://www.blogger.com/atom/ns#">SpringFrameworkUpdate</category><category domain="http://www.blogger.com/atom/ns#">Dulipalli</category><title>Spring 2.0 Update</title><description>Hi All,&lt;br /&gt;&lt;br /&gt;I think all are exited about the Spring Framework and its features.Here I just want to give the information about the latest release in Spring Framework which is Spring 2.0.&lt;br /&gt;&lt;br /&gt;Rod Johnson CEO of Inteface21 company and the father of the Spring framework has given a presenation on Spring 2.0 Update.&lt;br /&gt;&lt;br /&gt;New features explained in his presenation are :&lt;br /&gt;&lt;br /&gt;1. Scoping of beans (Added scopes are Http Session and the custome scope).In spring 1.2 we have only singleton and prototype.&lt;br /&gt;2. Portlet MVC framework (Spring MVC for JSR 168).&lt;br /&gt;3. Message Driven POJOS to support asynchronous communication in JMS (Rod Johnson loves only the  Message Driven Beans in the EJB spec now he replaced that with Message Driven POJOS)&lt;br /&gt;4.Spring XML Schema configuration(XSD support and added custom namespaces to hide some complexities) .&lt;br /&gt;5. Spring 2.0 provided tx,jee,util,aop namespaces to hide some complexities.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/www.javapolis.com/JP05Content/talks/day4/rodjohnson/index.html"&gt;Check his presentaion here &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Venkat.&lt;br /&gt;Sun Certified Professional.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-8724236446113773660?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=yI9MbBwP5tE:-DZo2X9hgMI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=yI9MbBwP5tE:-DZo2X9hgMI:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/yI9MbBwP5tE" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/yI9MbBwP5tE/spring-20-update.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>0</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2007/07/spring-20-update.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7094180513846470970.post-3355595666927512863</guid><pubDate>Tue, 10 Jul 2007 19:45:00 +0000</pubDate><atom:updated>2008-03-21T11:38:49.554-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Webservices</category><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">Axis 2</category><category domain="http://www.blogger.com/atom/ns#">Tomcat</category><title>Writing Apache Axis 2 webservice using Tomcat and eclipse</title><description>Hi All,&lt;br /&gt;&lt;br /&gt;Here I just want to show you an example of how should one can develope a simple webservice using Axis2 and Eclipse.&lt;br /&gt;&lt;br /&gt;Prerequisites setup to run this example: &lt;strong&gt;&lt;span style="color:#3366ff;"&gt;Apache Axis 2,Tomcat 5.5,Java 5.0,Eclipse,Apache Axis 2 plugins for eclipse&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;You can download the required softwares from the following links&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.eclipse.org/downloads/"&gt;Eclipse&lt;/a&gt;&lt;br /&gt;&lt;a href="http://ws.apache.org/axis2/download/1_2/download.cgi"&gt;Axis2&lt;/a&gt; Download the distributed war file which can be deployed into any web container.&lt;br /&gt;&lt;a href="http://ws.apache.org/axis2/tools/index.html"&gt;Axis 2 Eclipse Plugins&lt;/a&gt; Download the service archive wizard and code generator wizard plugins.&lt;br /&gt;&lt;a href="http://tomcat.apache.org/download-55.cgi"&gt;Tomcat&lt;/a&gt;&lt;br /&gt;Download JDK 5 If you don't have already&lt;br /&gt;&lt;a href="http://java.sun.com/javase/downloads/index_jdk5.jsp"&gt;JAVA5&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Installation Steps:&lt;br /&gt;1.Install JDK 5.&lt;br /&gt;2.Install Eclipse.&lt;br /&gt;3.Install Tomcat.&lt;br /&gt;4.Install the axis2 web application in Tomcat.(copy the war file to tomcat/webapps folder).&lt;br /&gt;5.copy the downloaded Axis 2 plugins to eclipse/plugins folder.&lt;br /&gt;&lt;br /&gt;Start the tomcat now.&lt;br /&gt;Test the installation of Axis 2:&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#3366ff;"&gt;&lt;a href="http://localhost:8080/axis2/services/listservices"&gt;http://localhost:8080/axis2/services/listservices&lt;/a&gt;&lt;/span&gt; -- It will show you the version service.That means Aixs 2 is installed successfully.&lt;br /&gt;&lt;br /&gt;Here I am just showing How to expose a Java class as webservice using Axis 2 plugins.&lt;br /&gt;&lt;br /&gt;1. Start the Eclipse -- create a Java project name it as HelloWebservice.&lt;br /&gt;2. Create a Java class with a method as sayHello(String name).&lt;br /&gt;3. In Eclipse select File--&gt;New --&gt;Other --&gt; Axis 2Wizards --&gt;It will show codegen and service archive wizards.&lt;br /&gt;4. Select Service Archive wizard click Next --&gt; It will ask for the class file location --&gt;select the classes folder in java project and click Next.&lt;br /&gt;5. Check the skip wsdl checkbox so that it will generate the wsdl file then click Next.&lt;br /&gt;6. It will asks for the libraries you have any..Click Next.&lt;br /&gt;7. Check the generate service.xml automatically check box it will generate the service.xml.then click Next.&lt;br /&gt;8. It will asks for the output file location and name --&gt; give it as &lt;tomcat_home&gt;/WEB-INF/services and hello respectively. Tomcat home is where the tomcat is installed in your system.It will create hello.aar in the services folder.&lt;br /&gt;9. It will show you a popup saying operation completed successfully.click OK.&lt;br /&gt;&lt;br /&gt;Now try the following url :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://localhost:8080/axis2/services/listservices"&gt;http://localhost:8080/axis2/services/listservices&lt;/a&gt; you will see your service listed there.&lt;br /&gt;&lt;br /&gt;Click on your service..It will open up wsdl in the browser.&lt;br /&gt;&lt;a href="http://localhost:8080/axis2/services/hello?wsdl"&gt;http://localhost:8080/axis2/services/hello?wsdl&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#6666cc;"&gt;Generating the client for the hello webservice :&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#6666cc;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;Now we are going to use the code generation wizard to generate the stubs for the webservice and we will write a client to call the webservice using the generated stubs.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;1.In Eclipse select File--&gt;New --&gt;Other --&gt; Axis 2Wizards --&gt;It will show codegen and service archive wizards.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;2 Select Codegeneration wizard and click next.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;3. Select the generate java source from the wsdl file radio button and click next.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;4. It will asks for the wsdl location give the following url--&gt; &lt;a href="http://localhost:8080/axis2/services/hello?wsdl"&gt;http://localhost:8080/axis2/services/hello?wsdl&lt;/a&gt; and click Next.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;5. use the default options don't change anything and click Next.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;6. It will asks for the output path select the eclipse project radio button and browse the same eclipse project or use another eclipse project for the client.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;7. It will show a popup saying that all operations completed successfully click Ok.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;8. After that we have to copy the axis2 lib folder into the eclipse project where the client is generated and add all the jars to the classpath of the project.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;9. Now we have to write the client -- create a java class named as HelloClient with Main method.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;10. Add the following code in the main method..&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;HelloHelloSOAP12BindingPort_httpStub stub=new HelloHelloSOAP12BindingPort_httpStub();&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;HelloHelloSOAP12BindingPort_httpStub.SayHello sayHello=new HelloHelloSOAP12BindingPort_httpStub.sayHello();&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;sayHello.setName("Venkat");&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;HelloHelloSOAP12BindingPort_httpStub.SayHelloResponse response=stub.sayHello(sayHello);&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;System.out.println(response.getReturn());&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;Run the HelloClient&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;It will print the message Hello Venkat.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;Thats it.. see how easy the webservice developement with Axis 2 and Eclipse.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;Let me know if you have any doubts on this example.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;you can reach me at &lt;a href="mailto:venkat@vbitech.com"&gt;venkat@vbitech.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#666666;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#6666cc;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Venkat.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7094180513846470970-3355595666927512863?l=j2eeframeworks.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=8DBgfugqEnY:DWMxfK0ybB8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/J2eeapplications?a=8DBgfugqEnY:DWMxfK0ybB8:63t7Ie-LG7Y"&gt;&lt;img src="http://feeds.feedburner.com/~ff/J2eeapplications?d=63t7Ie-LG7Y" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/J2eeapplications/~4/8DBgfugqEnY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/J2eeapplications/~3/8DBgfugqEnY/exposing-apache-axis-2-webservice-with.html</link><author>noreply@blogger.com (Venkat Dulipalli)</author><thr:total>2</thr:total><feedburner:origLink>http://j2eeframeworks.blogspot.com/2007/07/exposing-apache-axis-2-webservice-with.html</feedburner:origLink></item></channel></rss>

