<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Radek's Tech Blog &#187; hibernate</title>
	<atom:link href="http://urbas.tk/index.php/tag/hibernate/feed/" rel="self" type="application/rss+xml" />
	<link>http://urbas.tk</link>
	<description>Radoslaw H. Urbas homepage / blog</description>
	<lastBuildDate>Tue, 01 Jun 2010 20:31:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>AppFuse &#8211; first impression</title>
		<link>http://urbas.tk/index.php/2008/02/12/appfuse-first-impression/</link>
		<comments>http://urbas.tk/index.php/2008/02/12/appfuse-first-impression/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 14:38:40 +0000</pubDate>
		<dc:creator>Radoslaw Urbas</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[appfuse]]></category>
		<category><![CDATA[archetype]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[starer-kit]]></category>
		<category><![CDATA[struts]]></category>

		<guid isPermaLink="false">http://urbas.tk/?p=22</guid>
		<description><![CDATA[Couple days ago I was looking for some starter kit for Java web applications based on Spring framework. After short investigation I have decide to try some of Maven2 archetypes. If you just type: mvn archetype:create you get list of standard archetypes. Take a look on positions 1-9 (AppFuse starter-kits). For further investigation I chose [...]]]></description>
			<content:encoded><![CDATA[<p>Couple days ago I was looking for some starter kit for Java web applications based on Spring framework. After short investigation I have decide to try some of Maven2 archetypes. If you just type: <code>mvn archetype:create</code> you get list of standard archetypes. Take a look on positions 1-9 (AppFuse starter-kits).</p>
<p>For further investigation I chose appfuse-modular-struts which is a solution based on Hibernate, Spring and Struts2.</p>
<p>To kickoff application kickoffs there are just few simple steps:</p>
<ul>
<li>Launch database. I was trying it with Derby and PostgreSQL.</li>
<li>Configure database settings in pom.xml in main directory by adding line <code><activation><activebydefault>true</activebydefault></activation></code> in &#8216;profiles&#8217; section after &#8216;id&#8217; of DB of your choice and setting proper user/pass and database name if applicable.</li>
<li>Kickoff Maven build and run application:<code><br />
mvn<br />
cd web<br />
mvn jetty:run-war</code></li>
<li>Navigate to http://localhost:8080 in you browser.</li>
</ul>
<p>You will see simple application that allows to:</p>
<ul>
<li>Log in (admin/admin).</li>
<li>List the users.</li>
<li>Edit user data.</li>
</ul>
<p>Everything looks great. That is the moment when you are starting to look for sources of this application. To get the source you need to invoke another Maven target<br />
<code>mvn appfuse:full-source</code>.</p>
<p>Now you can rebuild the application and do the changes you want.<br />
There is also nice feature for adding standard code. You can generate all required class and configurations for domain objects. To do this add new domain object in <code>your.application.model</code> package in <code>core</code> module and annotate it properly. After that:<code><br />
cd core<br />
mvn appfuse:gen -Dentity=YourNewObject<br />
cd ..<br />
cd web<br />
mvn appfuse:gen -Dentity=YourNewObject<br />
</code><br />
All the classes, configurations and webpages should be ready for performing CRUD operations for this POJO!</p>
<p>Everything looks great, but there is one concern. Don&#8217;t use Java 1.6. <strong>Use Java 1.5</strong>. It took me several hours to figure out that this is the problem while tests fails (just HTTP 500 respond, no exceptions, no logs). Haven&#8217;t investigated yet what&#8217;s it the core of the problem with using it on Java 6.</p>
<p>AppFuse homepage: <a href="http://appfuse.org/display/APF/Home">http://appfuse.org/display/APF/Home</a></p>
]]></content:encoded>
			<wfw:commentRss>http://urbas.tk/index.php/2008/02/12/appfuse-first-impression/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

