<?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>Chris Johnston &#187; Java Frameworks</title>
	<atom:link href="http://www.fuzzylizard.com/archives/category/java-frameworks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fuzzylizard.com</link>
	<description>Web development and design with a little VFX thrown in for fun</description>
	<lastBuildDate>Mon, 14 Sep 2009 23:06:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Note to self; Mockito cannot stub final methods</title>
		<link>http://www.fuzzylizard.com/archives/2008/08/23/973/</link>
		<comments>http://www.fuzzylizard.com/archives/2008/08/23/973/#comments</comments>
		<pubDate>Sat, 23 Aug 2008 10:56:24 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Frameworks]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/?p=973</guid>
		<description><![CDATA[I realize this is clearly stated on the Mockito website, but it caught myself and my pair up for a little while. we were trying to stub out a ResourceBundle using Mockito and found that the unit test kept trying to find a concrete implementation of the ResourceBundle. The reason, we figured out is that [...]]]></description>
			<content:encoded><![CDATA[<p>I realize this is clearly stated on <a href="http://code.google.com/p/mockito/">the Mockito website</a>, but it caught myself and my pair up for a little while. we were trying to stub out a <code>ResourceBundle</code> using Mockito and found that the unit test kept trying to find a concrete implementation of the <code>ResourceBundle</code>. The reason, we figured out is that the <code>ResourceBundle.getString()</code> method is final and Mockito cannot mock or stub final methods. Something to keep in mind when working with this mocking framework.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2008/08/23/973/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wicket Phone Book and Maven 2</title>
		<link>http://www.fuzzylizard.com/archives/2008/01/21/919/</link>
		<comments>http://www.fuzzylizard.com/archives/2008/01/21/919/#comments</comments>
		<pubDate>Mon, 21 Jan 2008 06:07:41 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Application Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Frameworks]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wicket]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2008/01/21/919/</guid>
		<description><![CDATA[This evening I tried to download and setup the wicket-phonebook example in Eclipse. The application uses Maven2, something I have not had a lot of experience working with. In the root directory of wicket-phonebook, there is a script called Eclipse.sh which configures everything as an Eclipse project. It also downloads into the Maven2 repository almost [...]]]></description>
			<content:encoded><![CDATA[<p>This evening I tried to download and setup the <a href="http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-phonebook">wicket-phonebook</a> example in Eclipse. The application uses Maven2, something I have not had a lot of experience working with. In the root directory of wicket-phonebook, there is a script called Eclipse.sh which configures everything as an Eclipse project. It also downloads into the Maven2 repository almost all the dependencies.</p>
<p>However, there are two steps that are not done:</p>
<ol>
<li>Set up the M2_REPO environment variable in Eclipse</li>
<li>Download and install JTA</li>
</ol>
<p>For the first, I found the following command:</p>
<pre>
mvn -Declipse.workspace=
<path_to_workspace> eclipse:add-maven-repo
</path_to_workspace></pre>
<p>And for the second problem, I found the answer on <a href="http://www.jugpadova.it/articles/2005/11/26/maven-2-spring-and-jta-depencies">JUGPadova website.</a> In short, the problem has to do with Sun&#8217;s licensing of some of their J2EE jar files. Once I downloaded the JTA.1.0.1B.jar file, the following command put it in place and took care of all remaining errors in my Eclipse project.</p>
<pre>
mvn install:install-file \
  -Dfile=./jta-1_0_1B-classes.zip \
  -DgroupId=javax.transaction \
  -DartifactId=jta -Dversion=1.0.1B \
  -Dpackaging=jar
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2008/01/21/919/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use Hibernate Paging when processing lots of objects</title>
		<link>http://www.fuzzylizard.com/archives/2007/04/03/876/</link>
		<comments>http://www.fuzzylizard.com/archives/2007/04/03/876/#comments</comments>
		<pubDate>Wed, 04 Apr 2007 03:03:37 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Java Frameworks]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/04/03/876/</guid>
		<description><![CDATA[At work right now I have been trying to solve an OutOfMemoryException in a Java web application. The app exposes a bunch of web services. All of which can end up processing a large collection of objects returned via Hibernate. All of which can also keep a Hibernate session opened for a very long time.
So [...]]]></description>
			<content:encoded><![CDATA[<p>At work right now I have been trying to solve an <code>OutOfMemoryException</code> in a Java web application. The app exposes a bunch of web services. All of which can end up processing a large collection of objects returned via Hibernate. All of which can also keep a Hibernate session opened for a very long time.</p>
<p>So far, the solution we have found is to use paging along with releasing the session before doing another Hibernate query. We do the query, get back a collection of objects and iterate over that collection, processing each one in turn. Then, when we are done, we close that session, open a new one and get another collection of objects.</p>
<p>Hibernate makes this very easy to do:</p>
<pre>
public Collection find(int page, String hsql) {
    getSession.close();
    getSession();
    int page_size = 25;
    query=session.createQuery(hsql);
    return query.setFirstResult(page * page_size)
            .setMaxResults(page_size).list();
}
</pre>
<p>I have not supplied implementations for <code>getSession</code> since this depends on how you are working with Hibernate (i.e., Spring or <code>HibernateUtil</code> class).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2007/04/03/876/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wicket it is</title>
		<link>http://www.fuzzylizard.com/archives/2007/03/31/875/</link>
		<comments>http://www.fuzzylizard.com/archives/2007/03/31/875/#comments</comments>
		<pubDate>Sat, 31 Mar 2007 05:53:15 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Java Frameworks]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[TeamDocs]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/03/31/875/</guid>
		<description><![CDATA[For my open source Java app, I have decided to go with &#8220;Wicket.&#8221;:http://wicket.sourceforge.net/ My decision really comes down to two things; 1) I like the idea behind Wicket, I like the website, and I like that it is suppose to be fun to program with and 2) I have to learn something so why shouldn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>For my open source Java app, I have decided to go with &#8220;Wicket.&#8221;:http://wicket.sourceforge.net/ My decision really comes down to two things; 1) I like the idea behind Wicket, I like the website, and I like that it is suppose to be fun to program with and 2) I have to learn something so why shouldn&#8217;t it be Wicket. And getting a comment from one of the developer&#8217;s didn&#8217;t hurt either.</p>
<p>Plus, with working at ThoughtWorks, I figure I will have plenty of time to learn other frameworks, so why not learn one of the up and coming ones. At least this way, if I am ever put on a project at the beginning, I can argue for or against its use intelligently.</p>
<p>Thanks to all the people who offered their suggestions. So now I just have to get my butt in gear and start coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2007/03/31/875/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What Java web framework to use?</title>
		<link>http://www.fuzzylizard.com/archives/2007/03/27/874/</link>
		<comments>http://www.fuzzylizard.com/archives/2007/03/27/874/#comments</comments>
		<pubDate>Wed, 28 Mar 2007 04:00:36 +0000</pubDate>
		<dc:creator>Chris Johnston</dc:creator>
				<category><![CDATA[Application Development]]></category>
		<category><![CDATA[J2EE]]></category>
		<category><![CDATA[Java Frameworks]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/03/27/874/</guid>
		<description><![CDATA[I have a very &#8220;neglected open source project&#8221;:http://code.google.com/p/teamdocs/ that I am going to start working on again. I am going to rewrite it from the ground up using Hibernate and JPA or Hibernate Annotations (I am not quite sure yet), probably Spring, and some web framework. The problem is that I can&#8217;t pick a framework.
I [...]]]></description>
			<content:encoded><![CDATA[<p>I have a very &#8220;neglected open source project&#8221;:http://code.google.com/p/teamdocs/ that I am going to start working on again. I am going to rewrite it from the ground up using Hibernate and JPA or Hibernate Annotations (I am not quite sure yet), probably Spring, and some web framework. The problem is that I can&#8217;t pick a framework.</p>
<p>I was going to go with &#8220;Wicket&#8221;:http://wicket.sourceforge.net/, but I am not sure I want to go with something that is component based and I can&#8217;t really find any good tutorials. There is suppose to be a book coming out, but I don&#8217;t really want to wait. On the other hand, it is supposed to be fairly easy to learn and fun to work with.</p>
<p>I have also been thinking of using &#8220;Struts 2&#8243;:http://struts.apache.org/2.x/. Yesterday, I found a nice &#8220;120 page tutorial on getting started&#8221;:http://code.google.com/p/sq1-struts2/ with it that would be a huge help. Struts is the 800 pound gorilla when it comes to web frameworks and Struts 2 is suppose to be easier to learn and work with.</p>
<p>Then there is Spring MVC, Tapestry, Echo2, Trails, Stripes, JSF, etc, etc, etc.</p>
<p>Anyone have any suggestions on which one to learn and use? My only requirements are that it be fairly easy to learn, has very good tutorial and documentation support, being actively developed, and is not Struts 1.x, and has some IDE/tool support.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fuzzylizard.com/archives/2007/03/27/874/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
