<?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>redemption in a blog &#187; Java</title>
	<atom:link href="http://blog.codefront.net/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.codefront.net</link>
	<description>Rails, Firefox, Anime, Mac</description>
	<lastBuildDate>Tue, 24 Jan 2012 01:47:54 +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>Vibrant Ink TextMate theme for Eclipse</title>
		<link>http://blog.codefront.net/2006/09/28/vibrant-ink-textmate-theme-for-eclipse/</link>
		<comments>http://blog.codefront.net/2006/09/28/vibrant-ink-textmate-theme-for-eclipse/#comments</comments>
		<pubDate>Thu, 28 Sep 2006 12:40:02 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/2006/09/28/vibrant-ink-textmate-theme-for-eclipse/</guid>
		<description><![CDATA[Spent some time tinkering with Eclipse&#8217;s preferences today as I was really missing the Vibrant Ink theme for TextMate and Eclipse is looking pretty now&#8230; The only thing that I still couldn&#8217;t figure out was how to change the color of the folding/breakpoint bar next to the gutter. And I&#8217;m really starting to like the [...]]]></description>
			<content:encoded><![CDATA[<p>Spent some time tinkering with Eclipse&#8217;s preferences today as I was really missing the <a href="encytemedia.com/blog/articles/2006/01/03/textmate-vibrant-ink-theme-and-prototype-bundle">Vibrant Ink theme for TextMate</a> and Eclipse is looking pretty now&#8230;</p>
<div class="img">
<img src="http://blog.codefront.net/archives/screenshots/eclipse-textmate-snippet.png" />
</div>
<p><br style="clear: both" /></p>
<p>The only thing that I still couldn&#8217;t figure out was how to change the color of the folding/breakpoint bar next to the gutter. And I&#8217;m really starting to like the Monaco font that seems to be the default programmer&#8217;s font on Macs (I found a <a href="http://www.system7designs.com/blog/textmate-envy-aka-monaco-font-for-windows/">Windows version of Monaco</a> but haven&#8217;t tried it).</p>
<p>I guess TextMate envy still exists even when you are on a Mac with a registered version of TextMate heh.</p>
<p><ins>Here&#8217;s <a href="http://blog.codefront.net/wp-content/uploads/2006/09/Eclipse%20preferences.epf">my Eclipse preferences</a> (I just did a File -> Export -> Preferences). It seems Eclipse only allows a full export/import so you may want to be careful to <strong>backup your existing preferences</strong> before importing mine.</ins></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2006/09/28/vibrant-ink-textmate-theme-for-eclipse/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Copy &#8216;n&#8217; Paste and the incorrigible programmer</title>
		<link>http://blog.codefront.net/2006/03/10/copy-n-paste-and-the-incorrigible-programmer/</link>
		<comments>http://blog.codefront.net/2006/03/10/copy-n-paste-and-the-incorrigible-programmer/#comments</comments>
		<pubDate>Fri, 10 Mar 2006 12:05:58 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2006/03/10/copy-n-paste-and-the-incorrigible-programmer/</guid>
		<description><![CDATA[We just never learn, do we? String fromLocationCode; Location fromLocation = request.getFromLocation(); String toLocationCode; Location toLocation = request.getFromLocation(); // Do stuff to toLocation First, my (extremely talented) colleague makes a similar copy and paste blooper, and one day later I repeat the same mistake. But, but&#8230; Select boring code, Ctrl-C, Ctrl-V, it&#8217;s sooo easy&#8230;]]></description>
			<content:encoded><![CDATA[<p>We just never learn, do we?</p>
<div class="code">String fromLocationCode;<br />
Location fromLocation = request.getFromLocation();</p>
<p>String toLocationCode;<br />
Location toLocation = request.getFromLocation();</p>
<p>// Do stuff to toLocation</p></div>
<p>First, my (extremely talented) colleague makes a similar copy and paste blooper, and one day later I repeat the same mistake. But, but&#8230; Select boring code, Ctrl-C, Ctrl-V, it&#8217;s <em>sooo</em> easy&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2006/03/10/copy-n-paste-and-the-incorrigible-programmer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>J2SE 5.0 is out</title>
		<link>http://blog.codefront.net/2004/10/01/j2se-50-is-out/</link>
		<comments>http://blog.codefront.net/2004/10/01/j2se-50-is-out/#comments</comments>
		<pubDate>Fri, 01 Oct 2004 02:28:22 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Asides]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2004/10/01/j2se-50-is-out/</guid>
		<description><![CDATA[New Features and Enhancements in J2SE 5.0. I miss Java. I&#8217;m having a rough time getting used to wxPython (mostly because of its lack of documentation).]]></description>
			<content:encoded><![CDATA[<p><a href="http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html">New Features and Enhancements in J2SE 5.0</a>. I miss Java. I&#8217;m having a rough time getting used to wxPython (mostly because of its lack of documentation).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2004/10/01/j2se-50-is-out/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JMF applet without JMF installed?</title>
		<link>http://blog.codefront.net/2004/08/25/jmf-applet-without-jmf-installed/</link>
		<comments>http://blog.codefront.net/2004/08/25/jmf-applet-without-jmf-installed/#comments</comments>
		<pubDate>Wed, 25 Aug 2004 11:37:49 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2004/08/25/jmf-applet-without-jmf-installed/</guid>
		<description><![CDATA[A long shot, but do any of you Java programmers think an applet that uses JMF can be deployed and run on a client that doesn&#8217;t have JMF installed? I think the chances would be higher if instead of an applet, a Java Web Start application was used instead. Bundling the JMF libraries could work, [...]]]></description>
			<content:encoded><![CDATA[<p>A long shot, but do any of you Java programmers think an applet that uses <a href="http://java.sun.com/products/java-media/jmf/index.jsp"><acronym title="Java Media Framework">JMF</acronym></a> can be deployed and run on a client that <em>doesn&#8217;t</em> have <acronym title="Java Media Framework">JMF</acronym> installed?</p>
<p>I think the chances would be higher if instead of an applet, a Java Web Start application was used instead. Bundling the JMF libraries could work, but there hasn&#8217;t been any report of success as far as I can find. (It is <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&#038;f=45&#038;t=001407">possible with a full-blown Java application though</a>.)</p>
<p>Any leads at all would be good. In the meantime I will be trying this out myself.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2004/08/25/jmf-applet-without-jmf-installed/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Help needed with .NET and Java</title>
		<link>http://blog.codefront.net/2004/03/08/help-needed-with-net-and-java/</link>
		<comments>http://blog.codefront.net/2004/03/08/help-needed-with-net-and-java/#comments</comments>
		<pubDate>Mon, 08 Mar 2004 11:27:13 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2004/03/08/help-needed-with-net-and-java/</guid>
		<description><![CDATA[Update: Dave has an excellent solution to the ButtonListBar .NET control problem. Firstly, the .NET question: does anybody know how to get this Button ListBar Control to work? I was trying to get the.NET Button ListBar control into my VB project&#8217;s toolbox &#8211; I followed these instructions: To use the control, add either the ButtonListBar.vb [...]]]></description>
			<content:encoded><![CDATA[<p><ins>Update: <a href="http://www.dovitz.com/blog">Dave</a> has an excellent  <a href="http://blog.codefront.net/archives/2004/03/09/getting_net_button_listbar_control_to_work.php">solution to the ButtonListBar .NET control problem</a>.</ins></p>
<p>Firstly, the .NET question: does anybody know how to get this <a href="http://www.vbaccelerator.com/home/NET/Code/Controls/ListBar/Button_List_Bar/article.asp">Button ListBar Control</a> to work?</p>
<p>I was trying to get the.NET Button ListBar control into my VB project&#8217;s toolbox &#8211; I followed these instructions:</p>
<blockquote><p>To use the control, add either the ButtonListBar.vb or ButtonListBar.cs file to your project. You should find the control automatically appears in the Toolbox; if not you&#8217;ll need to force the toolbox to display the<br />
control: typically I find that double clicking on the control source file to open its designer causes this to occur.&#8221;</p></blockquote>
<p>Unfortunately, it doesn&#8217;t appear automatically when I added ButtonListBar.vb (via &#8220;Add existing item&#8221;). So I double-clicked the source file&#8230; But it threw out this error</p>
<blockquote><p>The class ButtonListBar can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file&#8230;</p></blockquote>
<p>Which I don&#8217;t understand of course. Neither did it cause the ListBar control to appear in the Toolbox. I have emailed the author about this, but if anyone knows what I&#8217;m doing wrong, please let me know ASAP.</p>
<p>This of course leads to the question: What is the correct way to add a user control which comes in source form?</p>
<p>Now, for the Java question: is there an existing library/package that would allow me to calculate the median and, say, the 95th percentile of a population quickly? I searched to no avail, of course, before I ask this.</p>
<p>I can do this myself the hard way, but I&#8217;m really pressed for time. I&#8217;d like to reuse an existing solution if there is any.</p>
<p>Thanks for any leads!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2004/03/08/help-needed-with-net-and-java/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Spotlight on Java and J2EE at SitePoint</title>
		<link>http://blog.codefront.net/2003/11/14/spotlight-on-java-and-j2ee-at-sitepoint/</link>
		<comments>http://blog.codefront.net/2003/11/14/spotlight-on-java-and-j2ee-at-sitepoint/#comments</comments>
		<pubDate>Thu, 13 Nov 2003 18:00:12 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2003/11/14/spotlight-on-java-and-j2ee-at-sitepoint/</guid>
		<description><![CDATA[Web development site SitePoint has recently started a series of articles on Java in it&#8217;s Spotlight on Java and J2EE. A new article is published everyday, and the quality is good. SitePoint is popularly-known as one of THE places for PHP articles (its PHP forum is also one of the busiest) &#8211; this shift in [...]]]></description>
			<content:encoded><![CDATA[<p>Web development site <a href="http://www.sitepoint.com/">SitePoint</a> has recently started a series of articles on Java in it&#8217;s <a href="http://www.sitepoint.com/subcat/94">Spotlight on Java and J2EE</a>. A new article is published everyday, and the quality is good.</p>
<p>SitePoint is popularly-known as one of THE places for PHP articles (its <a href="http://www.sitepointforums.com/forumdisplay.php?f=34" title="PHP forum at SitePoint Forums">PHP forum</a> is also one of the busiest) &#8211; this shift in focus to enterprise technologies is encouraging, since I&#8217;ve always thought newer web developers tend to view PHP as the end all and be all to getting a serious job in web development. This is my opinion of course, and in no way should this be construed as trolling! :-)</p>
<p>Are you a Java developer? Come help make the <a href="http://www.sitepointforums.com/forumdisplay.php?f=35" title="Java forum at SitePoint Forums">Java forum</a> (it&#8217;s currently called the &#8220;Java, ColdFusion and Other Languages&#8221; forum, but that will soon change in our proposed forum structure changes) more lively. We need more members to help grow the Java forum, be they leaders in discussions or fledging newbies.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2003/11/14/spotlight-on-java-and-j2ee-at-sitepoint/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flash your keyboard lights with Java</title>
		<link>http://blog.codefront.net/2003/09/01/flash-your-keyboard-lights-with-java/</link>
		<comments>http://blog.codefront.net/2003/09/01/flash-your-keyboard-lights-with-java/#comments</comments>
		<pubDate>Mon, 01 Sep 2003 08:54:29 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2003/09/01/flash-your-keyboard-lights-with-java/</guid>
		<description><![CDATA[From atog: found this very interesting keyboard spinner with code (in Java) posted. I tried it out and it works! There&#8217;s a hypnotic effect watching the lights flashing.]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://atog.typepad.com/atog/2003/09/keyboard_spinne.html" title="keyboard spinner">atog</a>: found this very interesting <a href="http://weblogs.java.net/pub/wlg/403">keyboard spinner</a> with code (in Java) posted. I tried it out and it works! There&#8217;s a hypnotic effect watching the lights flashing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2003/09/01/flash-your-keyboard-lights-with-java/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Python &amp; Java comparison article</title>
		<link>http://blog.codefront.net/2003/08/14/python-java-comparison-article/</link>
		<comments>http://blog.codefront.net/2003/08/14/python-java-comparison-article/#comments</comments>
		<pubDate>Thu, 14 Aug 2003 02:23:33 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2003/08/14/python-java-comparison-article/</guid>
		<description><![CDATA[Stephen Ferg claims A programmer can be significantly more productive in Python than in Java. in his article &#8220;Python &#038; Java: a Side-by-Side Comparison&#8220;. The basis of his argument centres around dynamic typing in Python, among other things like code verbosity.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ferg.org/index.html">Stephen Ferg</a> claims</p>
<blockquote><p>
A programmer can be significantly more productive in Python than in Java.
</p></blockquote>
<p>in his article &#8220;<a href="http://www.ferg.org/projects/python_java_side-by-side.html">Python &#038; Java: a Side-by-Side Comparison</a>&#8220;. The basis of his argument centres around dynamic typing in Python, among other things like code verbosity.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2003/08/14/python-java-comparison-article/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>foreach in Java 1.5</title>
		<link>http://blog.codefront.net/2003/08/13/foreach-in-java-15/</link>
		<comments>http://blog.codefront.net/2003/08/13/foreach-in-java-15/#comments</comments>
		<pubDate>Wed, 13 Aug 2003 00:59:26 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2003/08/13/foreach-in-java-15/</guid>
		<description><![CDATA[Joshua Bloch and Neal Gafter&#8217;s recent JavaLive chat further talks on generics and typesafe enums, 2 of the more significant new language features in the Java 1.5. There is interesting discussion on generics especially. My favorite though is the enhanced for loop which is similar to the foreach construct in languages like PHP and Python. [...]]]></description>
			<content:encoded><![CDATA[<p>Joshua Bloch and Neal Gafter&#8217;s recent <a href="http://developer.java.sun.com/developer/community/chat/JavaLive/2003/jl0729.html">JavaLive chat</a> further talks on generics and typesafe enums, 2 of the more significant new language features in the Java 1.5. There is interesting discussion on generics especially.</p>
<p>My favorite though is the enhanced for loop which is similar to the <tt>foreach</tt> construct in languages like <acronym title="PHP Hypertext Preprocessor">PHP</acronym> and Python.</p>
<p>The following example reads &#8220;for each Object in the Collection C&#8230;&#8221;:</p>
<p><code language="Java"><br />
void displayAll(Collection c) {<br />
  for (Object o : c)<br />
    ((String)o).display();<br />
}<br />
</code></p>
<p>I&#8217;ve always found the Java (and C/C++) for-loop idiom to be overly wordy and reduces code legibility, so this is a welcome addition.</p>
<p>Related links:<br />
Previous <a href="http://java.sun.com/features/2003/05/bloch_qa.html">interview with Joshua Bloch</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2003/08/13/foreach-in-java-15/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>JADE on BEA Weblogic Server</title>
		<link>http://blog.codefront.net/2003/06/26/jade-on-bea-weblogic-server/</link>
		<comments>http://blog.codefront.net/2003/06/26/jade-on-bea-weblogic-server/#comments</comments>
		<pubDate>Thu, 26 Jun 2003 06:00:44 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2003/06/26/jade-on-bea-weblogic-server/</guid>
		<description><![CDATA[I&#8217;m confused by BEA Weblogic Server&#8217;s implementation of JMX. I&#8217;ve been trying to figure out how WLS 8.1 allows configuration and addition of new services so that I can run JADE (Java Agent DEvelopment Framework) as a managed service (via JMX). Basically, it would be a &#8220;port&#8221; of BlueJADE (which works for JBoss) for WLS. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m confused by BEA Weblogic Server&#8217;s implementation of JMX. I&#8217;ve been trying to figure out how WLS 8.1 allows configuration and addition of new services so that I can run <a href="http://sharon.cselt.it/projects/jade/">JADE</a> (Java Agent DEvelopment Framework) as a managed service (via JMX).</p>
<p>Basically, it would be a &#8220;port&#8221; of <a href="http://sourceforge.net/projects/bluejade">BlueJADE</a> (which works for JBoss) for WLS. Now if only I could figure out from the BEA documentation how to add a managed service, but the JMX edocs were of no help &#8211; lots on how to manage MBeans, nothing on how to actually deploy one for a new service.</p>
<p>It appears that WLS&#8217;s and JBoss&#8217;s JMX implementations are quite disimilar enough that there isn&#8217;t any resemblance in their XML descriptors nor their directory structures &#8211; I&#8217;m lost on how to proceed. And looking at how JBoss manages all it&#8217;s services via JMX, with configuration descriptors (*-service.xml files) clearly visible in the server directory, I can really see how JBoss&#8217;s microkernel architecture really pays off in this respect. I didn&#8217;t even need documentation to figure out how it works in JBoss!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2003/06/26/jade-on-bea-weblogic-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Artima.com &#8211; tech-oriented blog directory</title>
		<link>http://blog.codefront.net/2003/06/26/artimacom-tech-oriented-blog-directory/</link>
		<comments>http://blog.codefront.net/2003/06/26/artimacom-tech-oriented-blog-directory/#comments</comments>
		<pubDate>Thu, 26 Jun 2003 05:48:42 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2003/06/26/artimacom-tech-oriented-blog-directory/</guid>
		<description><![CDATA[Inspired by java.blogs, Bill Venners has set up Artima Weblogs for tech-oriented blog owners to submit their blogs so that it appears on an aggregated list. It does need a little redesign to make it look less &#8220;academic&#8221; though. I&#8217;ve signed up on the Open Source forums (only 3 of us at the time of [...]]]></description>
			<content:encoded><![CDATA[<p>Inspired by <a href="http://www.javablogs.com/">java.blogs</a>, Bill Venners has set up <a href="http://www.artima.com/weblogs/index.jsp">Artima Weblogs</a> for tech-oriented blog owners to submit their blogs so that it appears on an aggregated list. It does need a little redesign to make it look less &#8220;academic&#8221; though.</p>
<p>I&#8217;ve signed up on the <a href="http://www.artima.com/buzz/community.jsp?forum=141">Open Source</a> forums (only 3 of us at the time of writing).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2003/06/26/artimacom-tech-oriented-blog-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multi-author java tips blog</title>
		<link>http://blog.codefront.net/2003/06/21/multi-author-java-tips-blog/</link>
		<comments>http://blog.codefront.net/2003/06/21/multi-author-java-tips-blog/#comments</comments>
		<pubDate>Sat, 21 Jun 2003 07:25:35 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2003/06/21/multi-author-java-tips-blog/</guid>
		<description><![CDATA[I&#8217;m toying with the idea of a multi-author Java tips blog, and am looking for possible contributors. If there is sufficient interest, I&#8217;ll be able to setup a subdomain to host the blog. Please do contact me at redemption at codefront.net should you be interested. This is (what I foresee) a good opportunity to share [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m toying with the idea of a multi-author Java tips blog, and am looking for possible contributors. If there is sufficient interest, I&#8217;ll be able to setup a subdomain to host the blog.</p>
<p>Please do contact me at <a href="mailto:redemption@codefront.net">redemption at codefront.net</a> should you be interested. This is (what I foresee) a good opportunity to share your experience and expertise with the Java community via the informal weblog medium.</p>
<p><strong>UPDATE</strong>: I&#8217;ve setup a subdomain at <a href="http://javatips.codefront.net/">http://javatips.codefront.net/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2003/06/21/multi-author-java-tips-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>java.blogs gets confused</title>
		<link>http://blog.codefront.net/2003/06/21/javablogs-gets-confused/</link>
		<comments>http://blog.codefront.net/2003/06/21/javablogs-gets-confused/#comments</comments>
		<pubDate>Sat, 21 Jun 2003 07:03:53 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2003/06/21/javablogs-gets-confused/</guid>
		<description><![CDATA[java.blogs apparently gets confused when I updated the title of a blog entry &#8211; the updated blog becomes the newest entry and my subsequent blog entry does not appear on the java.blogs front page, nor on the blog details page. I apologize to java.bloggers for being lead to my old entry yet again. I may [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.javablogs.com/">java.blogs</a> apparently gets confused when I updated the title of a blog entry &#8211; the updated blog becomes the newest entry and my subsequent blog entry does not appear on the <a href="http://www.javablogs.com/Welcome.jspa">java.blogs front page</a>, nor on the blog details page.</p>
<p>I apologize to java.bloggers for being lead to my old entry yet again.</p>
<p>I may yet have to re-add by blog unless this fixes itself soon. (It&#8217;s an unresolved issue.)</p>
<p><strong>EDIT</strong>: It appears that an update of my blog details fixed the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2003/06/21/javablogs-gets-confused/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Tip #2: Static factory methods vs. constructors</title>
		<link>http://blog.codefront.net/2003/06/21/java-tip-2-static-factory-methods-vs-constructors/</link>
		<comments>http://blog.codefront.net/2003/06/21/java-tip-2-static-factory-methods-vs-constructors/#comments</comments>
		<pubDate>Sat, 21 Jun 2003 06:13:32 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2003/06/21/java-tip-2-static-factory-methods-vs-constructors/</guid>
		<description><![CDATA[Factory methods are simply methods that instantiate objects. Some factory methods in the Java 2 API that you would likely have used are the getInstance() and valueOf() methods. getInstance() is the conventional instantiation method in singletons, while valueOf() are often type-conversion methods, like in String.valueOf(int i). Providing a static factory method instead of a public [...]]]></description>
			<content:encoded><![CDATA[<p>Factory methods are simply methods that instantiate objects. Some factory methods in the Java 2 API that you would likely have used are the <tt>getInstance()</tt> and <tt>valueOf()</tt> methods. <tt>getInstance()</tt> is the conventional instantiation method in singletons, while <tt>valueOf()</tt> are often type-conversion methods, like in <tt>String.valueOf(int i)</tt>.</p>
<p>Providing a static factory method instead of a public constructor has both advantages and disadvantages, which will be discussed at length in the rest of this entry.</p>
<p><strong>Static factory methods have names</strong><br />
A class can have only a single constructor with a given signature, which is a restriction in cases where a class needs to be able to be instantiated using identical parameter lists. In cases like this, you can replace constructors with static factory methods with more intuitive names that highlight their differences.</p>
<p><strong>Static factory methods can improve performance</strong><br />
This is because static factory methods do not have to actually instantiate new objects each time they are invoked. This is what allows for the Singleton pattern, where a single instance is returned. It also allows instances to be cached within the object in cases where object instantiation is expensive (like for the case of instantiation of fields from a database) or frequently done.</p>
<p><strong>Static factory methods can return a subtype of their return type</strong><br />
This allows for interfaces to be returned by static factory methods, which is best exemplified in the Collections Framework. Needless to say, forcing a client to refer to the returned object by its interface rather than its actual class is a good practice.</p>
<p>Also, the class of the object returned can be private (non-public), so there is a degree of encapsulation where the private class can be modified without impacting clients of the API (possibly for bug-fixing or improvements, or just plain maintainence). The private classes can also vary depending on the parameters to the static factory, so long as they are subtypes of the return type, allowing for greater flexibility.</p>
<p><strong>Classes without public or protected constructors cannot be subclassed</strong><br />
This is an unavoidable fact, so classes designed for inheritance must have at least 1 public constructor to be able to be subclassed.</p>
<p>The verdict? Use static factory methods for a more intuitive API, to improve performance via object-caching, to implement singletons, in interface-based frameworks, and to return objects of private classes. Use constructors in classes designed for inheritance (there shouldn&#8217;t be many of these) and for greater visibility in API documentation (since they appear in a separate table in standard Javadocs).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2003/06/21/java-tip-2-static-factory-methods-vs-constructors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Integrating JADE into JBoss with BlueJADE</title>
		<link>http://blog.codefront.net/2003/06/17/integrating-jade-into-jboss-with-bluejade/</link>
		<comments>http://blog.codefront.net/2003/06/17/integrating-jade-into-jboss-with-bluejade/#comments</comments>
		<pubDate>Tue, 17 Jun 2003 07:04:57 +0000</pubDate>
		<dc:creator>Chu Yeow</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.codefront.net/archives/2003/06/17/integrating-jade-into-jboss-with-bluejade/</guid>
		<description><![CDATA[The following are installation instructions for integrating JADE (Java Agent DEvelopment Framework) as a managed container in JBoss using BlueJADE. It addresses several issues with group installation, which doesn&#8217;t seem to work as indicated in the official installation instructions. I&#8217;ve posted them more for reference than as a weblog entry per se. What is BlueJADE? [...]]]></description>
			<content:encoded><![CDATA[<p>The following are installation instructions for integrating <a href="http://sharon.cselt.it/projects/jade/">JADE</a> (Java Agent DEvelopment Framework) as a managed container in JBoss using <a href="http://sourceforge.net/projects/bluejade">BlueJADE</a>. It addresses several issues with group installation, which doesn&#8217;t seem to work as indicated in the official installation instructions. I&#8217;ve posted them more for reference than as a weblog entry <i>per se</i>.</p>
<p><strong>What is BlueJADE?</strong></p>
<p>BlueJADE makes the JADE agent system a manageable service under a J2EE application server. BlueJADE allows JADE to become a service that can be managed through JMX (Java Management Extension).</p>
<p><strong>Installation in WinXP</strong></p>
<p>Setting up the environment<br />
- Install JADE, BlueJADE and JBoss. It is recommended that a version of JBoss with Tomcat already integrated be used. Refer to their respective documentation on the installation process. This often involves simply unarchiving the binaries, or compilation if you&#8217;re building from sources.<br />
- Set the JADE_HOME, BLUEJADE_HOME and JBOSS_HOME environment variables to point to the respective directories.</p>
<p>Group Installation<br />
- Pick a group under $BLUEJADE_HOME/groups to install. It&#8217;s simplest to choose the &#8216;simpleagent&#8217; group.<br />
- To install the group, run the install script (install.bat) in $BLUEJADE_HOME/groups/simpleagent. 1 argument, the group to install, should be specified. A 2nd argument would copy over an existing JBoss environment if specified.<br />
  Eg.<br />
    $ install simpleagent default<br />
- At this point, you could run into problems. Apparently, the environment variables are not picked up properly by the installation script/program so you have to edit $BLUEJADE_HOME/bin/win/install.properties to add in the &#8220;missing&#8221; environment variables.<br />
  The variables include:<br />
    LOCALHOSTNAME, GROUP, TEMP, JBOSS_HOME, JADE_HOME, BLUEJADE_HOME<br />
  Set these to point to the exact path/name.<br />
- If installation goes well (no error messages), open the file $JBOSS_HOME/server/simpleagent/deploy/jade-service.xml. The element <attribute> with name=&#8221;ConfigDocName&#8221; should be pointing to an incorrect path &#8211; change it to point to $JBOSS_HOME/server/simpleagent/conf/jade-service-config.xml. Depending on the group you&#8217;re installing, there could be more bogus paths &#8211; just keep an eye out for them and correct accordingly.<br />
- Open that jade-service-config.xml file and make similar corrections for the 2 (or more, depending on your group) paths there:<br />
    xsi:noNamespaceSchemaLocation=$JBOSS_HOME/server/simpleagent/conf/JADE-1_0.xsd<br />
    jadeArgs=$JBOSS_HOME/server/simpleagent/conf/jadeboot.properties</p>
<p>Running JBoss with JADE container<br />
- Run JBoss with the simpleagent environment by executing the following command at $JBOSS_HOME/bin<br />
    run -c simpleagent<br />
- If all goes well, you should see no errors in the startup process and a JADE Remote Agent Management GUI appears (only for simpleagent and demoagent groups).<br />
- JADE is now manageable as a service under JMX &#8211; go to http://localhost:8080/jmx-console/</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.codefront.net/2003/06/17/integrating-jade-into-jboss-with-bluejade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

