<?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>Javatech &#187; Java</title>
	<atom:link href="http://javatech.org/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://javatech.org</link>
	<description>The Bleeding Edge of Java Technology</description>
	<lastBuildDate>Mon, 16 Apr 2012 22:48:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Sun to be bought by Oracle for $7.4 Billion</title>
		<link>http://javatech.org/2009/06/sun-to-be-bought-by-oracle-for-7-4-billion/</link>
		<comments>http://javatech.org/2009/06/sun-to-be-bought-by-oracle-for-7-4-billion/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 17:45:09 +0000</pubDate>
		<dc:creator>Darren Hicks</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://javatech.org/?p=75</guid>
		<description><![CDATA[The mighty behemoth, proprietary squelchor of innovation, and extremely expensive Oracle is about to acquire the open-source, free, and always innovative Sun.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a little late on this to really consider it news in the sense that news is usually new.  And I must admit I was sceptical when I first heard it, but it&#8217;s true.  Sun themselves admit it : http://www.sun.com/aboutsun/pr/2009-04/sunflash.20090420.1.xml.</p>
<p>The mighty behemoth, proprietary squelchor of innovation, and extremely expensive Oracle is about to acquire the open-source, free, and always innovative Sun ( and with that Java!).  Anyway I look at this it sucks &#8211; for Java, at least.  This will, in my humble opinion, accelerate Java&#8217;s path to Cobol &#8211; which it is destined to become as more agile languages come to maturity and continue to grow in popularity ( ruby, python, erlang ).</p>
<p>Rod Johnson, with Spring, is singing an optimistic tune ( <a title="Rod Johnson talks about the future of Java" href="http://www.infoq.com/presentations/SpringOne-Keynote-Rod-Johnson" target="_self">Spring Keynote Address on Future of Java</a> ) .  One that talks about Java having reached maturity and that it doesn&#8217;t really need to evolve anymore.  C doesn&#8217;t really evolve &#8211; it does what it does and does it very well.  As Rod says, &#8220;It doesn&#8217;t pretend to be C#.&#8221;  Point taken.  He goes on to say that in many ways the innovation in the Java community has already moved outside of the Java core.  Language improvements include Groovy and Scala.  Framework improvements come in the form of Grails ( and, he doesn&#8217;t mention this, Seam ).</p>
<p>Rod&#8217;s address is largely true, but it is also to drum up excitement for their new application generation project ROO.  This gives alot of the functionality one would get from Rails or Seam, but does things within a shell rather than all command line.  This is actually kind of nice because the shell can keep track of the context each subsequent command is running in and also allows for some pretty snazzy auto-completion features.</p>
<p>Should we Javaheads run around screaming the sky is falling?  Probably not.  But if we don&#8217;t get up to snuff with Grails and new projects like Seam and Roo which look to make things a whole lot RAD-der, then we&#8217;d better accept our role as stewards to the next generation of Cobol applications.</p>
<p>One more thing &#8211; Ruby, for example, is still missing a lot of enterprise tooling which we take for granted in the Java world.  Applications like JConsole and JProfiler don&#8217;t yet exists &#8211; so another way to look at this is on the larger programming stage, where what we&#8217;ve learned with Java should be created for Ruby, Python, and Erlang to ease the passing of the torch when the time comes.</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/06/sun-to-be-bought-by-oracle-for-7-4-billion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java 101: building your java classpath from a lib folder</title>
		<link>http://javatech.org/2009/02/java-101-building-your-java-classpath-from-a-lib-folder/</link>
		<comments>http://javatech.org/2009/02/java-101-building-your-java-classpath-from-a-lib-folder/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 05:43:37 +0000</pubDate>
		<dc:creator>Darren Hicks</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://javatech.org/2009/02/23/java-101-building-your-java-classpath-from-a-lib-folder/</guid>
		<description><![CDATA[OK &#8211; I admit it &#8211; my IDE and tools make me weak in many ways.  I was just having the hardest time getting my maven-managed project to run from a basic &#8220;java my.class.ClassName&#8221; command line invocation.  Why?  Because the freaking classpath is a million miles away from being a concern to me anymore.  So, [...]]]></description>
			<content:encoded><![CDATA[<p>OK &#8211; I admit it &#8211; my IDE and tools make me weak in many ways.  I was just having the hardest time getting my maven-managed project to run from a basic &#8220;java my.class.ClassName&#8221; command line invocation.  Why?  Because the freaking classpath is a million miles away from being a concern to me anymore.  So, jog the memory and immediately remember the -cp ( or -classpath ) option.  Also remember that I cannot specify a directory if I want to include all of the jars in that directory ( specifying a directory in the classpath will only load exploded .class files! ).</p>
<p>What I&#8217;ve got before me is a target/lib directory full of all of my maven2-managed dependencies.  I need to add each jar file explicitly into the classpath &#8211; barf!</p>
<p>Well, here&#8217;s a handy little shell script which will build that string for you:</p>
<p>for file in `ls lib`; do echo -n &#8216;lib/&#8217; &gt;&gt; classpath.txt;echo -n $file &gt;&gt; classpath.txt;echo -n &#8216;:&#8217; &gt;&gt; classpath.txt;done</p>
<p>Awesome &#8211; so just open the classpath.txt file and use that big &#8216;ol path however you want to.  Windows users would use a semi-colon instead of a colon above.  Also, remember that you need to specify the classpath option prior to the name of the class to run &#8211; otherwise the classpath is ignored ( as it is assumed to be an argument to the program and not a jvm option ).</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/02/java-101-building-your-java-classpath-from-a-lib-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Conventionally Annotated Configuration &#8211; Spring, Hibernate, Eclipse</title>
		<link>http://javatech.org/2009/02/a-conventionally-annotated-configuration-spring-hibernate-eclipse/</link>
		<comments>http://javatech.org/2009/02/a-conventionally-annotated-configuration-spring-hibernate-eclipse/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 07:31:29 +0000</pubDate>
		<dc:creator>Darren Hicks</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://javatech.org/2009/02/18/a-conventionally-annotated-configuration-spring-hibernate-eclipse/</guid>
		<description><![CDATA[I&#8217;m starting on a personal project and decided I was going to take the time to do things right.  This means different things to different folks, but to me it basically entails: Using the latest and greatest versions of everything.  Eclipse 3.4.  Hibernate 3.3.1.  Spring 2.5.6.  Tomcat 6.  Maven 2.0.9.  Java 6 ( 7? ), [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting on a personal project and decided I was going to take the time to do things right.  This means different things to different folks, but to me it basically entails:</p>
<ol>
<li>Using the latest and greatest versions of everything.  Eclipse 3.4.  Hibernate 3.3.1.  Spring 2.5.6.  Tomcat 6.  Maven 2.0.9.  Java 6 ( 7? ), DWR 3.0.</li>
<li>Using Eclipse plugins to do as much as possible without causing headaches</li>
<li>Using as little XML configuration as possible &#8211; conventions, conventions, conventions!!!</li>
<li>Using JPA annotations for ORM classes.</li>
<li>Using Annotations for IOC dependencies.</li>
<li>Using Annotations for Transactional demarcation.</li>
<li>Using Annotations for MVC mappings.</li>
<li>Using very basic JSTL-based JSP&#8217;s for views.</li>
<li>Using Sitemesh to present a uniform look and feel across all pages.</li>
<li>For icing on the cake I&#8217;d like to also include GWT components.</li>
</ol>
<p><strong>Using the latest and greatest versions of everything</strong><br />
If you install Eclipse 3.4 first, and then install the Maven Integration plugin, it will greatly simplify things.  Just add Maven Integration to your project and then use &#8220;Add Dependency&#8221; option to quickly scour the entire repository and find the exact groupIds, artifactIds, and versions you want.  It also has a great view of the dependency hierarchy!  Getting all of these bleeding-edge versions to play nice together has its fair share of challenges.</p>
<p><strong> Using as little XML configuration as possible</strong></p>
<p><strong>Using Eclipse plugins to do as much as possible without causing headaches</strong></p>
<p>I already mentioned Maven Integration above to help with getting the LAGV of all the technologies being used.  Also of great value and import are SysDeo and  Subclipse.  Sysdeo is great for deploying and debugging your webapp in Tomcat.  Subclipse is great for seamless integration with an SVN repostiory.  Yes &#8211; use SCM on personal projects, you never know when you&#8217;ll need to revert or bring the code down onto a new machine.</p>
<p>But where do we draw the line here?  When do we have so much annotation cruft that an externalized xml configuration will seem like the ideal solution ( from whence we currently come in search of clarity! ).</p>
<p><strong>Using very basic JSTL-based JSP&#8217;s for views</strong><br />
OK &#8211; well, tonight I was getting ready to put together the first couple of jsp&#8217;s now that the @Controller mappings are working and the pages are being served correctly.  I&#8217;ve got the method mapped correctly with @RequestMapping and I&#8217;ve got the model being put into pagescope with @ModelAttribute.  I&#8217;m ready to loop through a List using JSTL forEach.  But wait, can this possibly be true?  Tomcat6 has no implementation of JSTL.  JSTL 1.2 is the LAGV and the JSTL 1.1 is abandoned.  Only *Glassfish* ships with the reference implementation of JSTL 1.2?!?  Oh brother.  Thanks to <a title="Tomcat6 depends on Glassfish?!?" href="http://www.mularien.com/blog/2008/02/19/tutorial-how-to-set-up-tomcat-6-to-work-with-jstl-12/">Peter Mularien for writing a nice post</a> informing me of this.</p>
<p>As if needing to download and install glassfish in order to get the JSTL 1.2 implementation jars for Tomcat6 wasn&#8217;t bad enough, well I hit a couple more snags after that.  First of all, I want to know who decided on the namespaces for JSTL 1.1 vs 1.2.  Here they are:</p>
<p>1.0  == &lt;%@taglib prefix=&#8221;c&#8221; uri=&#8221;http://java.sun.com/jsp/core&#8221; %&gt;</p>
<p>1.1 &amp; 1.2 ==&lt;%@taglib prefix=&#8221;c&#8221; uri=&#8221;http://java.sun.com/jsp/jstl/core&#8221; %&gt;</p>
<p>I mean all they did was add the &#8220;jstl&#8221; into the path?!?  I&#8217;m supposed to remember this?  OK &#8211; I&#8217;ll try harder to remember for next time.</p>
<p>Then, I learned that Maven2 doesn&#8217;t copy &#8220;system&#8221; provided jars into WEB-INF/lib by default and they need to be placed there manually as part of the project.  So, the appserv-jstl.jar I copied from glassfish wasn&#8217;t being included because I linked Maven to it as a system ( vs provided, or compile, or test, etc&#8230; ) dependency.</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2009/02/a-conventionally-annotated-configuration-spring-hibernate-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ArrayList vs Vector</title>
		<link>http://javatech.org/2008/03/arraylist-vs-vector/</link>
		<comments>http://javatech.org/2008/03/arraylist-vs-vector/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 15:15:06 +0000</pubDate>
		<dc:creator>Darren Hicks</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://javatech.org/2008/03/18/arraylist-vs-vector/</guid>
		<description><![CDATA[I&#8217;ve done some more work on the ArrayList vs Vector performance issue.  The post below originally stated that Vector would/could outperform ArrayList even though it is synchronized while ArrayList is not.  Well, in digging deeper into the issue, I&#8221;ve determined that there is a problem with the benchmarking framework being used.  I ran a very [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: red"><em>I&#8217;ve done some more work on the ArrayList vs Vector performance issue.  The post below originally stated that Vector would/could outperform ArrayList even though it is synchronized while ArrayList is not.  Well, in digging deeper into the issue, I&#8221;ve determined that there is a problem with the benchmarking framework being used.  I ran a very simple test with ArrayList and Vector to look at performance of add() and contains() methods and have determined that:</em></p>
<p><em>ArrayList.add() is 13% faster than Vector.add()</em></p>
<p><em>ArrayList.contains() is 3% faster than Vector.contains()</em></p>
<p><em>Now I need to identify the problem with the benchmark framework. </em><br />
</span><br />
I&#8217;ve been surprised of late in my Unique Collection Building benchmarks that TreeSet was outperformed by ArrayList.  One reason this could happen would be due to the nature of the dataset being processed and the data set I had contained many items with the first 20 characters or so being the same.  You know, lots of entries starting with &#8220;/WEB-INF/javascript&#8221; perhaps.  This would have made the TreeSets comparisons in deciding ordering more costly.</p>
<p>So, now I run the test again but with Vector thrown into the mix and the Strings are all 40 characters long and very, very random.  The odds of differing after 2 or 3 characters are now very high.</p>
<p>TreeSet should do much better.</p>
<p>But how will Vector fair?</p>
<p>You probably know as well as I do that ArrayList is the faster, unsynchronized option to Vector ( much like using StringBuilder instead of StringBuffer ).  But how much faster is ArrayList?  Here are the results:</p>
<p><a href="http://javatech.org/wp-content/uploads/2008/03/building_unique_collection_of_random-generated_40_character_strings_-_every_element_appears_twice_2008_03_18__01_15_am.png" title="building_unique_collection_of_random-generated_40_character_strings_-_every_element_appears_twice_2008_03_18__01_15_am.png"><img src="http://javatech.org/wp-content/uploads/2008/03/building_unique_collection_of_random-generated_40_character_strings_-_every_element_appears_twice_2008_03_18__01_15_am.png" alt="building_unique_collection_of_random-generated_40_character_strings_-_every_element_appears_twice_2008_03_18__01_15_am.png" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2008/03/arraylist-vs-vector/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The cost of Autoboxing</title>
		<link>http://javatech.org/2008/03/the-cost-of-autoboxing/</link>
		<comments>http://javatech.org/2008/03/the-cost-of-autoboxing/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 07:36:52 +0000</pubDate>
		<dc:creator>Darren Hicks</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Benchmarks]]></category>

		<guid isPermaLink="false">http://javatech.org/2008/03/15/the-cost-of-autoboxing/</guid>
		<description><![CDATA[Simple question: How expensive is autoboxing of int/Integer types? Simple answer: 15 nanoseconds per boxing. No autoboxing ( ints only ) [source:java] public void runInternalTrial() throws Exception { int i = getRandomWithoutAutobox(); } public int getRandomWithoutAutobox() { return rnd.nextInt(1000); } [/source] Autoboxing [source:java] public void runInternalTrial() throws Exception { int i = getRandom(); } // [...]]]></description>
			<content:encoded><![CDATA[<p>Simple question: How expensive is autoboxing of int/Integer types?<br />
Simple answer: 15 nanoseconds per boxing.</p>
<p><b>No autoboxing ( ints only )</b><br />
[source:java]<br />
	public void runInternalTrial() throws Exception {<br />
		int i = getRandomWithoutAutobox();<br />
	}</p>
<p>	public int getRandomWithoutAutobox() {<br />
		return rnd.nextInt(1000);<br />
	}<br />
[/source]<br />
<b>Autoboxing</b><br />
[source:java]<br />
	public void runInternalTrial() throws Exception {<br />
		int i = getRandom();<br />
	}</p>
<p>	// Will Autobox an int to an Integer&#8230;<br />
	public Integer getRandom() {<br />
		return rnd.nextInt(1000);<br />
	}<br />
[/source]<br />
Note that the Autoboxing example has to Autobox the value returned by getRandom to an Integer and then the caller has to then unbox this back to an int primitive.  The two examples for HalfBoxing are simply Autoboxing and then not unboxing back to an int.  Here are the results:<br />
<a href='http://javatech.org/wp-content/uploads/2008/03/java_autoboxing_2008_03_12__02_07_am.png' title='java_autoboxing_2008_03_12__02_07_am.png'><img src='http://javatech.org/wp-content/uploads/2008/03/java_autoboxing_2008_03_12__02_07_am.thumbnail.png' alt='java_autoboxing_2008_03_12__02_07_am.png' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2008/03/the-cost-of-autoboxing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JVM Comparison and Java Optimization Myths</title>
		<link>http://javatech.org/2008/03/jvm-comparison-and-java-optimization-myths/</link>
		<comments>http://javatech.org/2008/03/jvm-comparison-and-java-optimization-myths/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 05:18:19 +0000</pubDate>
		<dc:creator>Darren Hicks</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://javatech.org/?p=40</guid>
		<description><![CDATA[Here&#8217;s a fairly comprehensive overview of 6 performance related myths as they relate to 7 different JVMs.  I now feel safer running with try/catch blocks and with synchronization.  We&#8217;ll be running our own benchmarks on these and the results will be up pretty soon.  Here&#8217;s the link to the paper.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a fairly comprehensive overview of 6 performance related myths as they relate to 7 different JVMs.  I now feel safer running with try/catch blocks and with synchronization.  We&#8217;ll be running our own benchmarks on these and the results will be up pretty soon.  Here&#8217;s the <a href="http://www.scribd.com/doc/248581/Java-Tech-Performance-Myths">link to the paper</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2008/03/jvm-comparison-and-java-optimization-myths/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JBoss Seam Presentation</title>
		<link>http://javatech.org/2007/11/jboss-seam-presentation/</link>
		<comments>http://javatech.org/2007/11/jboss-seam-presentation/#comments</comments>
		<pubDate>Fri, 16 Nov 2007 00:08:41 +0000</pubDate>
		<dc:creator>Darren Hicks</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://javatech.org/?p=20</guid>
		<description><![CDATA[Seam is a must learn technology &#8211; check it out. clipped from www.theserverside.com In this presentation, recorded at the recent Grails Exchange event in London, organized by Skills Matter, Christian Bauer discusses how JBoss Seam simplifies the handling of stateful conversations, multi-window operations and concurrent, fine-grained Ajax requests. He also shows how Seam unifies and [...]]]></description>
			<content:encoded><![CDATA[<div > Seam is a must learn technology &#8211; check it out. </div>
<table cellpadding="0" cellspacing="0" width="100%" style="margin: 12px 0px; font-family: arial; color: #333333; background: #ffffff; border: solid 4px #e5e5e5; width: 100%; clear: left;">
<tr>
<td valign="top">
<table cellpadding="0" cellspacing="0" width="100%" class="CM_CTB_Content_Wrap" style="margin: 0px; padding: 0px;background-color: #ffffff;">
<tr>
<td valign="top">
<table cellpadding="0" cellspacing="0" width="100%" style="border-bottom: solid 1px #dcdcdc; white-space: nowrap; margin-bottom: 8px; background-color: #eeeeee ;background-image: url(http://clipmarks.com/images/source-bg.gif); background-repeat: repeat-x; height: 24px; line-height: 24px; vertical-align: middle; padding-bottom: 4px; color: #666666; font-size: 10px;">
<tr>
<td valign="top"><a href="http://clipmarks.com/clip-to-blog/" title="clipmarks' clip-to-blog"><img src="http://content.clipmarks.com/blog_icon/ff77e9d2-5a35-4a49-9b78-211c2162adef/8F91C87C-C375-4D8B-99AD-189A0EC5FE9F/" alt="" width="19" height="19" border="0" style="vertical-align: middle; margin: 0px 4px; display: inline; border: none; float:none;" /></a>clipped from <a title="http://www.theserverside.com/news/thread.tss?thread_id=47490" href="http://www.theserverside.com/news/thread.tss?thread_id=47490" style="font-size: 11px;">www.theserverside.com</a></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="100%" style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;">
<tr>
<td valign="top"><!-- CLIPPED FROM: http://www.theserverside.com/news/thread.tss?thread_id=47490 -->
<div>In this presentation, recorded at the recent Grails Exchange event in London, organized by <a href="http://www.skillsmatter.com/">Skills Matter</a>, Christian Bauer discusses how JBoss Seam simplifies the handling of stateful conversations, multi-window operations and concurrent, fine-grained Ajax requests.  He also shows how Seam unifies and integrates popular open source technologies like Facelets, Hibernate, jBPM, Drools, Groovy, iText and Lucene. </div>
</td>
</tr>
</table>
<div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div>
<table cellpadding="0" cellspacing="0" width="100%" style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;">
<tr>
<td valign="top"><!-- CLIPPED FROM: http://www.theserverside.com/news/thread.tss?thread_id=47490 -->
<div align="center"><embed src="http://video.google.com/googleplayer.swf?docid=1030919232322118868" height="329" width="400" wmode="opaque" quality="high" flashvars="" type="application/x-shockwave-flash"></embed></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div style="margin: 0px 6px 6px 4px;">
<table style="font-size: 11px;border-spacing: 0px;padding: 0px;" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td style="background:transparent;border-width:0px;padding:0px;">&nbsp;</td>
<td align="right" style="background:transparent;border-width:0px;padding:0px;width:107px" width="107"><a href="http://clipmarks.com/share/8F91C87C-C375-4D8B-99AD-189A0EC5FE9F/blog/" title="blog or email this clip"><img src="http://content58022.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0px;padding:0px;margin:0px;" /></a></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2007/11/jboss-seam-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Patterns to Suppliment your Spring Configuration</title>
		<link>http://javatech.org/2007/11/using-patterns-to-suppliment-your-spring-configuration/</link>
		<comments>http://javatech.org/2007/11/using-patterns-to-suppliment-your-spring-configuration/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 18:24:58 +0000</pubDate>
		<dc:creator>Darren Hicks</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://javatech.org/?p=19</guid>
		<description><![CDATA[Your Spring configuration probably consists of one or more well know XML files which are loaded by name. Have you ever wanted to override something without having to touch your base configuration? Here&#8217;s what we do. After we load our base configuration we use a pattern to load any XML files which exist in a [...]]]></description>
			<content:encoded><![CDATA[<p>Your Spring configuration probably consists of one or more well know XML files which are loaded by name. Have you ever wanted to override something without having to touch your base configuration? Here&#8217;s what we do. After we load our base configuration we use a pattern to load any XML files which exist in a specific &#8220;configuration-override&#8221; directory. In most cases the directory is empty and just the base configuration is loaded. When we want to override a particular bean we just place a file in the override directory.Here&#8217;s a clip from the Spring API docs:</p>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top"><a href="http://clipmarks.com/clip-to-blog/" title="clipmarks' clip-to-blog"><img src="http://content.clipmarks.com/blog_icon/b13b2e88-8f64-407c-992f-d8235dfe4978/75B0FCF3-E8E9-4248-B600-031B6949D0BB/" border="0" height="19" width="19" /></a>clipped from <a href="http://static.springframework.org/spring/docs/2.0.x/reference/resources.html" title="http://static.springframework.org/spring/docs/2.0.x/reference/resources.html">static.springframework.org</a></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top"><!-- CLIPPED FROM: http://static.springframework.org/spring/docs/2.0.x/reference/resources.html --></p>
<p><h4>4.7.2.1. Ant-style Patterns</h4>
<p>When the path location contains an Ant-style pattern, for example:</p>
<pre>     /WEB-INF/*-context.xml
     com/mycompany/**/applicationContext.xml
     file:C:/some/path/*-context.xml
     classpath:com/mycompany/**/applicationContext.xml</pre>
<h4></h4>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2007/11/using-patterns-to-suppliment-your-spring-configuration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Integrating Google Earth with a Java webapp</title>
		<link>http://javatech.org/2007/11/integrating-google-earth-with-a-java-webapp/</link>
		<comments>http://javatech.org/2007/11/integrating-google-earth-with-a-java-webapp/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 08:51:17 +0000</pubDate>
		<dc:creator>Darren Hicks</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://javatech.org/?p=15</guid>
		<description><![CDATA[I did this at work the other day and thought I&#8217;d give the broad sweeping overview here should else want to do it. It&#8217;s not too bad after all&#8217;s said and done ( and sifted through&#8230; ). Here&#8217;s the quick and easy: 1) Add these mimetypes in web.xml: application/vnd.google-earth.kml+xml kml application/vnd.google-earth.kmz kmz 2) You&#8217;ll want [...]]]></description>
			<content:encoded><![CDATA[<p>I did this at work the other day and thought I&#8217;d give the broad sweeping overview here should else want to do it.  It&#8217;s not too bad after all&#8217;s said and done ( and sifted through&#8230; ).  Here&#8217;s the quick and easy:</p>
<p>1) Add these mimetypes in web.xml:<br />
<code><br />
<mime-mapping><br />
<mime-type>application/vnd.google-earth.kml+xml</mime-type><br />
<extension>kml</extension><br />
</mime-mapping><br />
<mime-mapping><br />
<mime-type>application/vnd.google-earth.kmz</mime-type><br />
<extension>kmz</extension><br />
</mime-mapping><br />
</code><br />
2) You&#8217;ll want to write back KML ( a flavor of XML ) with a content-type of &#8220;application/vnd.google-earth.kml+xml&#8221;:</p>
<p>response.setContentType(&#8220;application/vnd.google-earth.kml+xml&#8221;);</p>
<p>3) Make sure you give the stream a default filename that ends in .kml or else GoogleEarth won&#8217;t actually process the file.</p>
<p>response.setHeader(&#8220;Content-Disposition&#8221;, &#8220;attachment; filename=&#8221; + filename + &#8220;.kml&#8221;);</p>
<p>That&#8217;s really a 40,000 foot view of the process.  Here&#8217;s <a href="http://code.google.com/apis/kml/documentation/kml_tut.html">Google&#8217;s KML Tutorial</a> so you can learn more.</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2007/11/integrating-google-earth-with-a-java-webapp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C3P0 ConnectionPool Configuration Rules of Thumb</title>
		<link>http://javatech.org/2007/11/c3p0-connectionpool-configuration-rules-of-thumb/</link>
		<comments>http://javatech.org/2007/11/c3p0-connectionpool-configuration-rules-of-thumb/#comments</comments>
		<pubDate>Sun, 04 Nov 2007 06:14:23 +0000</pubDate>
		<dc:creator>Darren Hicks</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Benchmarks]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://javatech.org/?p=14</guid>
		<description><![CDATA[C3P0 is a fantastic open source ConnectionPool that is feature rich, stable, and positively production ready. I personally like it more than DBCP because there is too much blocking encountered when checking in/out connections with DBCP. C3P0 dodges that problem with an asynchronous return to the pool, but you might end up using a lot [...]]]></description>
			<content:encoded><![CDATA[<p>C3P0 is a fantastic open source ConnectionPool that is feature rich, stable, and positively production ready.  I personally like it more than DBCP because there is too much blocking encountered when checking in/out connections with DBCP.    C3P0 dodges that problem with an asynchronous return to the pool, but you might end up using a lot more connections than you need to if you&#8217;re not careful.  Here&#8217;s a list of the most important C3P0 settings and good production settings to use &#8211; along with some words of wisdom as to why the change from default is a good thing.</p>
<p><strong>acquireIncrement=5</strong> <em>default(3)</em> Batching the retrieval of Connections is wise because the process of opening a Connection is expensive.  Why do it 5 times instead of once?  The downside to this is that you may only need the one connection.  Read on to maxIdleTime settings to make sure idle connections make their way back into the pool.</p>
<p><strong>maxIdleTime=3600</strong> <em>default(0)</em> Setting the maxIdleTime to a non-zero value permits C3P0 to remove Connections from the pool and freeing up database resources.  This will never happen when maxIdleTime is set to 0.  Setting to a small value might have Connections being retrieved and returned on too frequent a basis to be practical, so I&#8217;ve picked 3600 seconds ( 1 hour ) as a nice happy medium.  Once the peak traffic is over, then the connections can be returned.</p>
<p><strong>maxIdleTimeExcessConnections=300</strong> <em>default(0)</em> You need to set this in addition to maxIdleTime to have the Connections removed from the pool and returned to the DB.</p>
<p><strong>maxPoolSize=100</strong> <em>default(15)</em> You&#8217;ll have to fine tune this setting base on your own individual situation, but it&#8217;s important to keep this on the largish side for the simple reason that C3P0 doesn&#8217;t synchronously return connections to the pool.  The implication of this is that the pool should actually be sized slightly larger than what you think the maximum number of Connections needed at peak time would be.  For more on this, see numHelperThreads.</p>
<p><strong>minPoolSize=20</strong> <em>default(3)</em> This one too can be fine tuned based on your individual needs, but let&#8217;s just say that you don&#8217;t always want to be returning all your Connections and having to reacquire new ones.  20 is a good size to allow for handling of new bursts of sporadic traffic w/o having to reacquire them.</p>
<p><strong>numHelperThreads=6</strong> <em>default(3)</em> This is a very important property if you&#8217;re going to have large bursts of traffic on your site.  C3P0 ( as was alluded to previously ) doesn&#8217;t return connections to the pool synchronously and as a result doesn&#8217;t have the same issues with blocking that DBCP has.  However, as a result, Connections are not made available until some arbitrary time after they are returned to the pool.  C3P0 has helperThreads which are responsible for doing the actual return work and making them available.  Under large load I&#8217;ve experienced times where these spikes could require 400 Connections using the default setting of 3.  Using 6 HelperThreads will keep this spike under 100 connections.  If you can afford the connections or won&#8217;t have huge loads on the system, then the default of 3 will probably be fine for you.</p>
<p><strong>unreturnedConnectionTimeout=3600</strong> <em>default(0)</em> I&#8217;ve set this to 1 hour.  If a Connection is used for longer than an hour, then C3P0 will assume it&#8217;s been orphaned and will reclaim the Connection to the pool &#8211; closing it in the process.</p>
]]></content:encoded>
			<wfw:commentRss>http://javatech.org/2007/11/c3p0-connectionpool-configuration-rules-of-thumb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

