<?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>amazing development &#187; Java</title>
	<atom:link href="http://amazing-development.com/archives/category/all/work/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://amazing-development.com</link>
	<description>ruby, java and the rest</description>
	<lastBuildDate>Sun, 21 Aug 2011 20:46:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Mocking context lookups</title>
		<link>http://amazing-development.com/archives/2006/07/24/mocking-context-lookups/</link>
		<comments>http://amazing-development.com/archives/2006/07/24/mocking-context-lookups/#comments</comments>
		<pubDate>Mon, 24 Jul 2006 12:48:08 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/07/24/mocking-context-lookups/</guid>
		<description><![CDATA[Sorry for another non-ruby post, but I&#8217;m currently very busy at work playing with JBoss 4, EJB 3, EasyMock, and a bunch of other pretty cool technologies. I&#8217;m a big fan of EasyMock but frequently I ran into problems when code performed lookups to get resources like: Context ctx = new InitialContext(); UserTransaction trans = [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>Sorry for another non-ruby post, but I&#8217;m currently very busy at work playing with JBoss 4, EJB 3, EasyMock, and a bunch of other pretty cool technologies.</p>
<p>I&#8217;m a big fan of <a href="http://easymock.org/">EasyMock</a> but frequently I ran into problems when code performed lookups to get resources like:</p>
<p><br clear="all"/></p>
<pre><code class="java">Context ctx = new InitialContext();
UserTransaction trans = (UserTransaction) ctx.lookup(&quot;UserTransaction&quot;);
trans.begin();</code></pre>
<p><span id="more-240"></span></p>
<p><a target="_new" href="http://flickr.com/photos/timwilson/187032003/"><img class="framedr" alt="lego elephant by TimWilson" src="http://static.amazing-development.com/blog_images/flickr/lego_elephant.jpg"/></a></p>
<p>At first it looked like I had to change the code to somehow inject my mock objects. But fortunately there is an easier, more elegant solution. </p>
<p>Java uses an instance of InitialContextFactory to create the InitialContext object. So the solution was to write a mock object for InitialContextFactory and tell Java to use it instead. This mock object must be a &#8216;real&#8217; class (not one created with EasyMock) that can be found by reflection.</p>
<p><br clear="all"/></p>
<pre><code class="java">import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.spi.InitialContextFactory;
/**
 * Provides a JNDI initial context factory for the MockContext.
 */
public class MockInitialContextFactory
  implements InitialContextFactory {
    private static Context mockCtx = null;
    public static void setMockContext(Context ctx) {
        mockCtx = ctx;
    }
    public Context getInitialContext(java.util.Hashtable< ?, ?> environment)
      throws NamingException {
        if (mockCtx == null) {
            throw new IllegalStateException(&quot;mock context was not set.&quot;);
        }
        return mockCtx;
    }
}</code></pre>
<p>To use it for my piece of example code, I have tell Java which InitialContextFactory to use (via <tt>java.naming.factory.initial</tt>), create a mock Context, create a mock Transaction, tell the mock Context to return the Transaction. And finally tell the mock factory to return the mock Context. This sound much more complex than it actually is, here&#8217;s the same in code:</p>
<pre><code class="java">System.setProperty(&quot;java.naming.factory.initial&quot;, &quot;MockInitialContextFactory&quot;);
Context mockCtx = createMock(Context.class);
UserTransaction mockTrans = createMock(UserTransaction.class);
expect(mockCtx.lookup(&quot;UserTransaction&quot;)).andReturn(mockTrans);
replay(mockCtx);
MockInitialContextFactory.setMockContext(mockCtx);</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/07/24/mocking-context-lookups/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting rid of Hypersonic Db in Jboss 4</title>
		<link>http://amazing-development.com/archives/2006/07/13/jbosshypersonic-annoyance/</link>
		<comments>http://amazing-development.com/archives/2006/07/13/jbosshypersonic-annoyance/#comments</comments>
		<pubDate>Thu, 13 Jul 2006 13:54:03 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/07/13/jbosshypersonic-annoyance/</guid>
		<description><![CDATA[I don&#8217;t know how much time I could have saved, if someone told me I should not use the hypersonic database for a production JBoss system. jboss.org/wiki: hsqldb is not a production quality database. I haven&#8217;t found a good tutorial, even the JBoss Developer&#8217;s Notebook wasn&#8217;t exhaustive, so here are my notes: How to remove [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know how much time I could have saved, if someone told me I should not use the hypersonic database for a production JBoss system.</p>
<blockquote><p><a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJBossMQDB">jboss.org/wiki</a>:<br />
hsqldb is not a production quality database.</p></blockquote>
<p><span id="more-236"></span><br />
I haven&#8217;t found a good tutorial, even the <a href="http://www.amazon.com/gp/redirect.html?link_code=ur2&#038;tag=amazingdevelo-20&#038;camp=1789&#038;creative=9325&#038;location=http%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2F0596100078%2Fref%3Dsr_11_1%3Fie%3DUTF8">JBoss Developer&#8217;s Notebook</a> wasn&#8217;t exhaustive, so here are my notes:</p>
<h3>How to remove the hypersonice db from JBoss</h3>
<ol>
<li>Remove datasource:<br />
delete <tt>deploy/hsqldb-ds.xml</tt></li>
<li>Add new datasource:<br />
for MySql add a file named <tt>deploy/mysql-ds.xml</tt> or whatever you like with something like:</p>
<pre><textarea wrap="off" class="code" rows="16" readonly>&lt;datasources&gt;
    &lt;local&#45;tx&#45;datasource&gt;
        &lt;jndi&#45;name&gt;MySqlDS&lt;/jndi&#45;name&gt;
        &lt;connection&#45;url&gt;jdbc&#58;mysql&#58;//localhost&#58;3306/datasource&lt;/connection&#45;url&gt;
        &lt;driver&#45;class&gt;com.mysql.jdbc.Driver&lt;/driver&#45;class&gt;
        &lt;user&#45;name&gt;myuser&lt;/user&#45;name&gt;
        &lt;password&gt;mypwd&lt;/password&gt;
        &lt;exception&#45;sorter&#45;class&#45;name&gt;
            org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter
        &lt;/exception&#45;sorter&#45;class&#45;name&gt;

        &lt;metadata&gt;
            &lt;type&#45;mapping&gt;mySQL&lt;/type&#45;mapping&gt;
        &lt;/metadata&gt;
    &lt;/local&#45;tx&#45;datasource&gt;
&lt;/datasources&gt;</textarea></pre>
<p>You should use <tt>MySqlDS</tt> as the jndi-name or you have to edit <tt>mysql-jdbc2-service.xml</tt> later</li>
<li>Use new datasource:<br />
find all references to <tt>DefaultDS</tt> and replace them with <tt>MySqlDS</tt> and all references to <tt>Hypersonic SQL</tt> with <tt>mySQL</tt></li>
<li>Configure jms:<br />
delete <tt>deploy/jms/hsqldb-jdbc2-service.xml</tt> and replace it with <tt>doc/examples/jms/mysql-jdbc2-service.xml</tt> and don&#8217;t forget to <a href="http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJBossMQDB">edit mysql-jdbc2-service.xml</a></p>
<blockquote><p>Edit the persistence configuration and change the line :-</p>
<p>SELECT_MAX_TX = SELECT MAX(TXID) FROM (SELECT MAX(TXID) AS TXID FROM JMS_TRANSACTIONS UNION SELECT MAX(TXID) AS TXID FROM JMS_MESSAGES)</p>
<p>to: -</p>
<p>SELECT_MAX_TX = SELECT MAX(TXID) FROM JMS_MESSAGES </p></blockquote>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/07/13/jbosshypersonic-annoyance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java 6 (aka Mustang) goes Ruby</title>
		<link>http://amazing-development.com/archives/2006/06/18/java-6-aka-mustang-goes-ruby/</link>
		<comments>http://amazing-development.com/archives/2006/06/18/java-6-aka-mustang-goes-ruby/#comments</comments>
		<pubDate>Sun, 18 Jun 2006 18:31:16 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/06/18/java-6-aka-mustang-goes-ruby/</guid>
		<description><![CDATA[Some time ago Martin Fowler wrote about Humane Interfaces which led to an lively debate. This is really old stuff, but yesterday I read about the upcoming Java 6 aka Mustang and one of the changes was adding the isEmpty() method to String. So it seems like Java is slowly getting more humane]]></description>
			<content:encoded><![CDATA[<p>Some time ago Martin Fowler wrote about <a href="http://martinfowler.com/bliki/HumaneInterface.html">Humane Interfaces</a> which led to an <a href="http://farm.tucows.com/blog/_archives/2005/12/9/1443435.html">lively debate</a>. This is really old stuff, but yesterday I read about the upcoming Java 6 aka Mustang and one of the changes was adding the <a href="http://download.java.net/jdk6/doc/api/java/lang/String.html#isEmpty%28%29"><tt>isEmpty()</tt></a> method to String. </p>
<p>So it seems like Java is slowly getting more humane <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/06/18/java-6-aka-mustang-goes-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Errorhandling Ruby vs. Java</title>
		<link>http://amazing-development.com/archives/2006/04/01/errorhandling-ruby-vs-java/</link>
		<comments>http://amazing-development.com/archives/2006/04/01/errorhandling-ruby-vs-java/#comments</comments>
		<pubDate>Sat, 01 Apr 2006 09:29:15 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/04/01/errorhandling-ruby-vs-java/</guid>
		<description><![CDATA[At my daytime job I had to rewrite a class which sends a Message to a Queue. Sounds simple? With EJB3 it is reasonably simple and can be done in around 10 lines of code involving lots of lookups. But if you are looking for a reliable solution which works even when the application server [...]]]></description>
			<content:encoded><![CDATA[<p><br />
At my daytime job I had to rewrite a class which sends a <a href="http://java.sun.com/javaee/5/docs/api/javax/jms/Message.html">Message</a> to a <a href="http://java.sun.com/javaee/5/docs/api/javax/jms/Queue.html">Queue</a>. Sounds simple? With EJB3 it is reasonably simple and can be done in around 10 lines of code involving lots of lookups. But if you are looking for a reliable solution which works even when the application server reboots every once in a while your code gets messy. My current solution has 120 lines of code and there are still some things to add like buffering of unsent messages.<span id="more-213"></span></p>
<h5>Bloated Exceptionhandling</h5>
<p>Why do I have to write so much more code to get a reliable solution? Part of the blame is on Java, because of its verbose exception handling &#8211; there is no elegant way of catching 2 or more exceptions<a href="#1">[1]</a> without catching Exception or Throwable, which I try to avoid where possible. Ruby has this simple solution compared to the bloated solution in java, especially with EJB where you have to catch half a dozend different exceptions.</p>
<pre><code class="ruby">begin
  eval string
rescue SyntaxError, NameError =&gt; boom
  print &quot;String doesn&apos;t compile&#58; &quot; + boom
rescue StandardError =&gt; bang
  print &quot;Error running script&#58; &quot; + bang
end</code></pre>
<h5>Retry</h5>
<p>Repeating whole blocks of code needs too much code, too. Ruby has the <a href="http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_expressions.html#UM"><tt>retry</tt></a> command, which restarts the current block:</p>
<pre><code class="ruby">c = 0
for i in 1..100
  tries = 0
  begin
    c = c + 1                 # dummy code
    if c % 4 != 0             # to create
      puts &quot;failed for #{i}&quot;  # a few
      raise &quot;uups&quot;            # exceptions
    end
    puts &quot;action #{i}&quot;
  rescue
    puts &quot;rescue&quot;
    tries = tries + 1
    retry if tries &lt; 3
  end
end</code></pre>
<p>This is just another name for goto, which might be harmful. Actually, I wouldn&#8217;t use this solution anyway because there is a better, more reusable way, to achieve the same.</p>
<h5>closures</h5>
<p>In ruby, it is possible (and very simple) to pass some code to a method. This allows me to create a method which excecutes my code multiple times, if an exceptions occurs:</p>
<pre><code class="ruby">def try(max_tries = 3)
  tries = 0
  begin
    yield
  rescue
    puts &quot;rescue&quot;
    tries = tries + 1
    retry if tries &lt; max_tries
  end
end

c = 0
for i in 1..100
  try do
    c = c + 1                 # dummy code
    if c % 4 != 0             # to create
      puts &quot;failed for #{i}&quot;  # a few
      raise &quot;uups&quot;            # exceptions
    end
    puts &quot;action #{i}&quot;
  end
end</code></pre>
<p />
<p>When I started this article, I just wanted to write a short rant about the missing features for errorhandling in java. While writing, I noticed that Ruby has them. Perhaps that&#8217;s the reason why I enjoy programming in ruby so much <img src='http://amazing-development.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p />
<p><a name="1">[1]</a>to clarify this point just for Jason: In general, there is no elegant way of catching two or more exceptions. If you look at the number of direct subclasses in <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html">java.lang.Exception</a>, it is nearly impossible to catch the exceptions you want using a superclass without catching some &#8216;innocent bystanders&#8217;.<br />
I would very much like to see a elegant solution which catches only java.sql.SQLException and java.util.concurrent.TimeoutException, you may use as much OOP and polymorphism as you like. This might not be the fault of the language but the plattform but as I cannot get one without the other, it doesn&#8217;t really matter to me. Don&#8217;t get me wrong, I think Java is pretty damn good, but there is still a lot of room to improve. And Ruby is showing some of the things which can be done better.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/04/01/errorhandling-ruby-vs-java/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Eclipse vs. Idea</title>
		<link>http://amazing-development.com/archives/2006/03/29/eclipse-vs-idea/</link>
		<comments>http://amazing-development.com/archives/2006/03/29/eclipse-vs-idea/#comments</comments>
		<pubDate>Wed, 29 Mar 2006 14:52:58 +0000</pubDate>
		<dc:creator>schlumpf</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Rants]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://amazing-development.com/archives/2006/03/29/eclipse-vs-idea/</guid>
		<description><![CDATA[I just read this blog entry about switching from Eclipse to Idea, and I fully agree with the author. Alas, I&#8217;m not really qualified to comment on that, since it has been nearly three years since I actually worked with Idea. Having changed my job, of necessity I also changed the IDE I&#8217;m working with, [...]]]></description>
			<content:encoded><![CDATA[<p>I just read <a href="http://www.javaddicts.net/blog/index.php/2006/01/16/eclipse-vs-idea-making-the-switch/">this blog entry</a> about switching from Eclipse to Idea, and I fully agree with the author. <span id="more-211"></span> Alas, I&#8217;m not really qualified to comment on that, since it has been nearly three years since I actually worked with Idea. Having changed my job, of necessity I also changed the IDE I&#8217;m working with, so now I&#8217;m stuck with Eclipse. And since then I wonder why Eclipse has to <em>think</em> quite some time to find all references to a <em>private</em> variable (no, I&#8217;m not talking of classes with 10,000 lines of code <img src='http://amazing-development.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ) &#8230; I still remember Idea favourably &#8212; at that time it was already better than Eclipse is now. </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2006/03/29/eclipse-vs-idea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Tuning Whitepaper</title>
		<link>http://amazing-development.com/archives/2005/12/09/java-tuning-whitepaper/</link>
		<comments>http://amazing-development.com/archives/2005/12/09/java-tuning-whitepaper/#comments</comments>
		<pubDate>Fri, 09 Dec 2005 10:15:46 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://amazing-development.com/?p=160</guid>
		<description><![CDATA[Sun provides a Java Tuning White Paper which provides an overview over VM settings beyond the well known -Xmx, -Xms and -server. Additionally, the document contains a lot of useful pointers for further reading.]]></description>
			<content:encoded><![CDATA[<p>Sun provides a <a href="http://java.sun.com/performance/reference/whitepapers/tuning.html">Java Tuning White Paper</a> which provides an overview over VM settings beyond the well known <tt>-Xmx</tt>, <tt>-Xms</tt> and <tt>-server</tt>.</p>
<p>Additionally, the document contains <a href="http://java.sun.com/performance/reference/whitepapers/tuning.html#section7">a lot of useful pointers</a> for further reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2005/12/09/java-tuning-whitepaper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful classes?</title>
		<link>http://amazing-development.com/archives/2005/08/08/useful-classes/</link>
		<comments>http://amazing-development.com/archives/2005/08/08/useful-classes/#comments</comments>
		<pubDate>Mon, 08 Aug 2005 14:56:41 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.spychalski.de/blog/archives/2005/08/08/useful-classes/</guid>
		<description><![CDATA[My article about Proxy and InvocationHandle made me think about other useful classes. I don&#8217;t know how long it took me to realize how much useful stuff can be found in Collections. Are there other classes out there (I&#8217;m not talking about yet another cool third party jar but about foundation classes) that I haven&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/archives/2005/08/02/weave-in-an-aspect-via-proxy/">My article about Proxy and InvocationHandle</a> made me think about other useful classes. I don&#8217;t know how long it took me to realize how much useful stuff can be found in <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html">Collections</a>.</p>
<p>Are there other classes out there (I&#8217;m not talking about yet another cool third party jar but about foundation classes) that I haven&#8217;t found yet?</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2005/08/08/useful-classes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Weave in an aspect via Proxy</title>
		<link>http://amazing-development.com/archives/2005/08/02/weave-in-an-aspect-via-proxy/</link>
		<comments>http://amazing-development.com/archives/2005/08/02/weave-in-an-aspect-via-proxy/#comments</comments>
		<pubDate>Tue, 02 Aug 2005 09:10:32 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.spychalski.de/blog/?p=137</guid>
		<description><![CDATA[This article shows how to use AOP with nothing but java &#8211; No code generation or bytecode manipulation. Sample Scenario: You want to insert logging statements for every call to every method of a certain class. This sounds like the default example used to promote AOP, but there is an easier solution if you know [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>This article shows how to use AOP with nothing but java &#8211; No code generation or bytecode manipulation.</p>
<p>Sample Scenario:<br />
You want to insert logging statements for every call to every method of a certain class. This sounds like the default example used to promote AOP, but there is an easier solution if you know about <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/Proxy.html">java.lang.reflect.Proxy</a> and <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/InvocationHandler.html">java.lang.reflect.InvocationHandler</a>.<span id="more-137"></span></p>
<p>Let&#8217;s take a random interface like</p>
<pre>public interface MyInterface {
  public void methodA(int i, String s, String t) throws IOException ;
}</pre>
<p>Use a factory to get the Implementation or the proxy and anything you like to switch between using a proxy and not using it.</p>
<pre>public class MyInterfaceFactory {
  public static MyInterface getMyInterface()  {
    Object impl = new MyInterfaceImpl();
    String proxySwitch = System.getProperty("myinterface.logging");

    if (proxySwitch == null) {
      return (MyInterface) impl;
    }
    InvocationHandler proxy = new LoggingProxy(impl);
    MyInterface bf2 = (MyInterface) Proxy.newProxyInstance(MyInterface.class.getClassLoader(),
                  new Class[] { MyInterface.class }, proxy);
    return bf2;
  }
}
</pre>
<p>An implement InvocationHandler to create a LoggingProxy. To keep this example simple, I used <tt>System.out.println</tt>, use any flavor of logging you like in the real world.</p>
<pre>public class LoggingProxy implements InvocationHandler {
  private Object target;
  public LoggingProxy(Object t) {
    target = t;
  }

  public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
    System.out.println("Method " + method.getName());
    for (int i = 0, l = args.length; i &lt; l; i++) {
      System.out.println("Object[" + i + "] " + args[i].getClass().getName() + " " + args[i]);
    }

      return method.invoke(target, args);
  }
}</pre>
<p>This implementation looks like it will work, but it has the slight problem, that it might change the behaviour of your application <img src='http://amazing-development.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2005/08/02/weave-in-an-aspect-via-proxy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ant macrodef</title>
		<link>http://amazing-development.com/archives/2005/03/09/macrodef-for-ant/</link>
		<comments>http://amazing-development.com/archives/2005/03/09/macrodef-for-ant/#comments</comments>
		<pubDate>Wed, 09 Mar 2005 11:23:22 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.spychalski.de/blog/archives/2005/03/09/macrodef-for-ant/</guid>
		<description><![CDATA[Finally Ant 1.6. supports a macrodef target. This article provides a not so short example to see macrodefs in action. There are three different ways to pass arguments to a macro: as an attribute &#8211; this is the easiest way and the one you will most likely use the most as text content &#8211; if [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>Finally Ant 1.6. supports a <a href="http://ant.apache.org/manual/CoreTasks/macrodef.html">macrodef</a> target. This article provides a not so short example to see macrodefs in action.<span id="more-91"></span></p>
<p>There are three different ways to pass arguments to a macro:</p>
<ul>
<li>as an attribute &#8211; this is the easiest way and the one you will most likely use the most</li>
<li>as text content &#8211; if you have to pass large amounts of text to your macro, this is probably the way to go</li>
<li>as element content &#8211; if you have to pass complex data or other ant tasks into your macro</li>
</ul>
<p>And you can combine these ways as you can see in fancy-echo-comb.</p>
<pre>&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;project name=&quot;whatever&quot; default=&quot;help&quot; basedir=&quot;.&quot;&gt;

  &lt;!&#45;&#45; parameter as attribute &#45;&#45;&gt;
  &lt;macrodef name=&quot;fancy&#45;echo&quot;&gt;
    <b>&lt;attribute name=&quot;text&quot; default=&quot;default value&quot;/&gt;</b>
    &lt;sequential&gt;
      &lt;echo message=&quot;by attribute&quot;/&gt;
      &lt;echo message=&quot;this is the simple example with parameter <b>@{text}</b>&quot;/&gt;
    &lt;/sequential&gt;
  &lt;/macrodef&gt;

  &lt;!&#45;&#45; parameter as text content &#45;&#45;&gt;
  &lt;macrodef name=&quot;fancy&#45;echo&#45;2&quot;&gt;
    <b>&lt;text name=&quot;text&quot;/&gt;</b>
    &lt;sequential&gt;
      &lt;echo message=&quot;by text&quot;/&gt;
      &lt;echo message=&quot;<b>@{text}</b>&quot;/&gt;
    &lt;/sequential&gt;
  &lt;/macrodef&gt;

  &lt;!&#45;&#45; parameter as child element &#45;&#45;&gt;
  &lt;macrodef name=&quot;fancy&#45;echo&#45;element&quot;&gt;
    <b>&lt;element name=&quot;content&quot;/&gt;</b>
    &lt;sequential&gt;
      &lt;echo message=&quot;by element&quot;/&gt;
      <b>&lt;content/&gt;</b>
    &lt;/sequential&gt;
  &lt;/macrodef&gt;

  &lt;!&#45;&#45; parameter as text content and attribute&#45;&#45;&gt;
  &lt;macrodef name=&quot;fancy&#45;echo&#45;comb&quot;&gt;
    <b>&lt;attribute name=&quot;text&#45;attr&quot; default=&quot;default value&quot;/&gt;
    &lt;text name=&quot;text&quot;/&gt;</b>
    &lt;sequential&gt;
      &lt;echo message=&quot;a combination&quot;/&gt;
      &lt;echo message=&quot;text content&quot;/&gt;
      &lt;echo message=&quot;<b>@{text}</b>&quot;/&gt;
      &lt;echo message=&quot;text attribute&quot;/&gt;
      &lt;echo message=&quot;<b>@{text&#45;attr}</b>&quot;/&gt;
    &lt;/sequential&gt;
  &lt;/macrodef&gt;

  &lt;!&#45;&#45; usage examples &#45;&#45;&gt;
  &lt;target name=&quot;help&quot; description=&quot;print this help&quot;&gt;
    &lt;fancy&#45;echo text=&quot;some text&quot;/&gt;
    &lt;echo/&gt;
    &lt;fancy&#45;echo/&gt;
    &lt;echo/&gt;
    &lt;fancy&#45;echo&#45;2&gt;use this way for longer text with
with newlines etc.&lt;/fancy&#45;echo&#45;2&gt;
    &lt;echo/&gt;
    &lt;fancy&#45;echo&#45;element&gt;
      &lt;content&gt;
        &lt;echo&gt;To pass an ant task into a macro, this is the way to go.&lt;/echo&gt;
      &lt;/content&gt;
    &lt;/fancy&#45;echo&#45;element&gt;
    &lt;echo/&gt;
    &lt;fancy&#45;echo&#45;comb text&#45;attr=&quot;and an additional attribute&quot;&gt;longer text with
with newlines
etc.&lt;/fancy&#45;echo&#45;comb&gt;
  &lt;/target&gt;
&lt;/project&gt;</pre>
<p>prints:</p>
<pre>Buildfile: build.xml

help:
     [echo] by attribute
     [echo] this is the simple example with parameter some text

     [echo] by attribute
     [echo] this is the simple example with parameter default value

     [echo] by text
     [echo] longer text with
     [echo] with newlines
     [echo] etc.

     [echo] by element
     [echo] To pass an ant task into a macro, this is the way to go.

     [echo] a combination
     [echo] text content
     [echo] use this way for longer text with
     [echo] with newlines etc.
     [echo] text attribute
     [echo] and an additional attribute

BUILD SUCCESSFUL
Total time: 0 seconds</pre>
<p>BTW, here are two books you might find useful, if you work with ant:</p>
<p><a href="http://www.amazon.de/exec/obidos/ASIN/0596006098/frankspycha0b-21/"><img src="http://images-eu.amazon.com/images/P/0596006098.03.MZZZZZZZ.jpg"/></a> <a href="http://www.amazon.de/exec/obidos/ASIN/1930110588/frankspycha0b-21/"><img src="http://images-eu.amazon.com/images/P/1930110588.03.MZZZZZZZ.jpg"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2005/03/09/macrodef-for-ant/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Jetif, jet another Java testing framework</title>
		<link>http://amazing-development.com/archives/2005/02/21/jetif-jet-another-java-testing-framework/</link>
		<comments>http://amazing-development.com/archives/2005/02/21/jetif-jet-another-java-testing-framework/#comments</comments>
		<pubDate>Mon, 21 Feb 2005 19:44:03 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.spychalski.de/blog/archives/2005/02/21/jetif-jet-another-java-testing-framework/</guid>
		<description><![CDATA[At TheServerSide there&#8217;s a short note about Jetif. As far as I can tell it&#8217;s jet another testing framework. It tries to solve the problem of redundant code when testing a method call for multiple values, but I couldn&#8217;t find support for anything beyond simple types and arrays. So when my method returns one of [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://www.theserverside.com/news/thread.tss?thread_id=31974">TheServerSide</a> there&#8217;s a short note about <a href="http://jetif.sourceforge.net/">Jetif</a>. As far as I can tell it&#8217;s jet another testing framework. It tries to solve the problem of redundant code when testing a method call for multiple values, but I couldn&#8217;t find support for anything beyond simple types and arrays. So when my method returns one of my own objects it&#8217;s no use. So nice idea, but not enough for me to switch from JUnit&#8230;</p>
<p><i>edited 28.2.05</i><br />
I was wrong. Now that Vicky mentioned it, I found a paragraph at the bottom of the comparison page saying just that. Still the bonus is not enough to change my existing code, but I&#8217;m sure I&#8217;ll soon have to write some new tests, where I can give it a try. During the discussion at theserverside.com Vicky mentioned something about a eclipse plugin which will raise my chances of actually using it greatly. Unfortunatly, no info about when it will be available&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2005/02/21/jetif-jet-another-java-testing-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tool of the day: Janino</title>
		<link>http://amazing-development.com/archives/2005/02/17/tool-of-the-day-janino/</link>
		<comments>http://amazing-development.com/archives/2005/02/17/tool-of-the-day-janino/#comments</comments>
		<pubDate>Thu, 17 Feb 2005 14:02:14 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.spychalski.de/blog/archives/2005/02/17/tool-of-the-day-janino/</guid>
		<description><![CDATA[Janino is a light-weight java compiler written in Java. Why Janino? Why not use the Sun SDK? &#8230; compiling Java programs with SUN&#8217;s JDK is a relatively resource-intensive process (disk access, CPU time, &#8230;). This is where Janino comes into play&#8230; a leight-weight, &#8220;embedded&#8221; Java compiler that compiles simple programs in memory into Java bytecode [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.janino.net/">Janino</a> is a light-weight java compiler written in Java.<span id="more-69"></span></p>
<p>Why Janino? Why not use the Sun SDK?</p>
<blockquote><p>&#8230; compiling Java programs with SUN&#8217;s JDK is a relatively resource-intensive process (disk access, CPU time, &#8230;).</p>
<p>This is where Janino comes into play&#8230; a leight-weight, &#8220;embedded&#8221; Java compiler that compiles simple programs in memory into Java bytecode which executes within the JVM of the running program.<br />
&#8230;</p></blockquote>
<p>here&#8217;s a short example:</p>
<pre>
String[] names = new String[] { "a", "b", "c", "d", "e" };
Class[] types = new Class[] { Boolean.TYPE, Boolean.TYPE,
                              Boolean.TYPE, Boolean.TYPE,
                              Boolean.TYPE };
String expr = "(a &#038; b || c &#038;&#038; d ) &#038; !e";
ExpressionEvaluator ee = new ExpressionEvaluator(expr,
                                                 Boolean.TYPE,
                                                 names,
                                                 types);

Class[] values = new Object[] { Boolean.FALSE, Boolean.TRUE,
                                Boolean.TRUE, Boolean.TRUE,
                                Boolean.FALSE};
System.out.println(ee.evaluate(values));
</pre>
<p>Interesting fact: <a href="http://groovy.codehaus.org/">Groovy</a> uses Janino, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2005/02/17/tool-of-the-day-janino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse Plugins</title>
		<link>http://amazing-development.com/archives/2005/02/11/eclipse-plugins/</link>
		<comments>http://amazing-development.com/archives/2005/02/11/eclipse-plugins/#comments</comments>
		<pubDate>Fri, 11 Feb 2005 14:19:43 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.spychalski.de/blog/archives/2005/02/11/eclipse-plugins/</guid>
		<description><![CDATA[Eclipse Plugins Exposed, Part 1: A First Glimpse by Emmanuel Proulx is the first part of a series about eclipse plugin development. What he writes sounds pretty interesting, now I have to find the time to actually try it]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.onjava.com/pub/a/onjava/2005/02/09/eclipse.html">Eclipse Plugins Exposed, Part 1: A First Glimpse</a> by Emmanuel Proulx is the first part of a series about eclipse plugin development. What he writes sounds pretty interesting, now I have to find the time to actually try it <img src='http://amazing-development.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2005/02/11/eclipse-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mock objects</title>
		<link>http://amazing-development.com/archives/2005/02/01/mcok-objects/</link>
		<comments>http://amazing-development.com/archives/2005/02/01/mcok-objects/#comments</comments>
		<pubDate>Tue, 01 Feb 2005 10:29:31 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.spychalski.de/blog/archives/2005/02/01/mcok-objects/</guid>
		<description><![CDATA[In Mock Objects in Unit Tests Lu Jian writes about two tools (EasyMock and Mocquer) which generate mock objects. Here&#8217;s my most frequently used mock object. Disclaimer: I know one could argue whether this is a &#8216;real&#8217; mock object or more of a mock object facade bastard thingy. I use Clock everywhere I would call [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>In <a href="http://www.onjava.com/pub/a/onjava/2005/01/12/mocquer.html">Mock Objects in Unit Tests</a> Lu Jian writes about two tools (<a href="http://www.easymock.org/">EasyMock</a> and <a href="http://mocquer.dev.java.net/">Mocquer</a>) which generate mock objects. Here&#8217;s my most frequently used mock object.<span id="more-50"></span></p>
<p>Disclaimer: I know one could argue whether this is a &#8216;real&#8217; mock object or more of a mock object facade bastard thingy.</p>
<p>I use <tt>Clock</tt> everywhere I would call <tt>System.currentTimeMillis()</tt> or call <tt>Calendar.get(...)</tt>. This gives me an easy way to fast-forward in time without sleeps during unit tests.</p>
<pre>
public class Clock {

<b>// some methods left out for clarity</b>

  private static boolean debugMode = false;

  /**
   * dummy time, default value of 0 produced some strange errors in some tests
   */
  private static long lMillis = 12341234;
  private static int hour;

  private Clock() {
    // no instances needed
  }
  /**
   * facade for System.currentTimeMillis()
   */
  public static long currentTimeMillis() {
    if (debugMode) {
      return lMillis;
    }
    return System.currentTimeMillis();
  }

  /**
   * facade for Calendar.get(Calendar.HOUR_OF_DAY)
   */
  public static int getHour() {
    if (debugMode) {
      return hour;
    }
    final Calendar c = Calendar.getInstance();
    return c.get(Calendar.HOUR_OF_DAY);
  }

  public static void setDebugMode(boolean b) {
    debugMode = b;
  }

  private static void checkDebug() {
    if (!debugMode) {
      throw new IllegalStateException("You cannot set or change time now. Turn on debug mode first");
    }
  }

  public static void setCurrentTimeMillis(final long l) {
    checkDebug();
    lMillis = l;
  }

  public static void addCurrentTimeMillis(final long l) {
    checkDebug();
    lMillis += l;
  }

  public static void setHour(final int i) {
    checkDebug();
    if (i < 0 || i > 23) {
      throw new IllegalArgumentException("hour '" + i + "'");
    }
    hour = i;
  }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2005/02/01/mcok-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ant help target</title>
		<link>http://amazing-development.com/archives/2005/01/28/ant-help-target/</link>
		<comments>http://amazing-development.com/archives/2005/01/28/ant-help-target/#comments</comments>
		<pubDate>Fri, 28 Jan 2005 12:54:40 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.spychalski.de/blog/archives/2005/01/28/ant-help-target/</guid>
		<description><![CDATA[Here&#8217;s a little addon to Eric M. Burke pretty good article &#8220;Top 15 Ant Best Practices&#8221;. Concerning help he wrote: 4. Provide Good Help Strive to make the buildfile self-documenting. Adding target descriptions is the easiest way to accomplish this. When you type ant -projecthelp, you see a listing of each target containing a description. [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>Here&#8217;s a little addon to Eric M. Burke pretty good article <a href="http://www.onjava.com/pub/a/onjava/2003/12/17/ant_bestpractices.html">&#8220;Top 15 Ant Best Practices&#8221;</a>.<span id="more-33"></span></p>
<p>Concerning help he wrote:</p>
<blockquote><p>
<b>4. Provide Good Help</b><br />
Strive to make the buildfile self-documenting. Adding target descriptions is the easiest way to accomplish this. When you type ant -projecthelp, you see a listing of each target containing a description. For example, you might define a target like this:</p>
<pre>
&lt;target name="compile"
  description="Compiles code, output goes to the build dir."&gt;
</pre>
<p>The simple rule is to include descriptions for all of the targets you wish programmers to invoke from the command line. Internal targets should not include description attributes. Internal targets may include targets that perform intermediate processing, such as generating code or creating output directories.</p>
<p>Another way to provide help is to include XML comments in the buildfile. Or, define a target named help that prints detailed usage information when programmers type ant help.</p>
<pre>
&lt;target name="help"
        description="Display detailed usage information"&gt;
  &lt;echo&gt;Detailed help...&lt;/echo&gt;
&lt;/target&gt;
</pre>
</blockquote>
<p>You can combine these two things to get a simple help target without much effort. You call <tt>ant -p/-projecthelp</tt> &#8216;from the inside&#8217; via the <tt>exec</tt> task. This way you don&#8217;t have to write a seperate help target.</p>
<pre>
&lt;project name="whatever" default="help" basedir="."&gt;
 &lt;target name="compile" description="compile my code"/&gt;
 &lt;target name="jar"     description="build my jar"/&gt;
 &lt;target name="clean"   description="cleanup"/&gt;
 
 &lt;target name="help"    description="print this help"&gt;
  &lt;exec executable="ant"&gt;
   &lt;arg value="-p"/&gt;
  &lt;/exec&gt;
 &lt;/target&gt;
&lt;/project&gt;
</pre>
<p>prints</p>
<pre>
$ ant
Buildfile: build.xml

help:
     [exec] Buildfile: build.xml

     [exec] Main targets:

     [exec]  clean    cleanup
     [exec]  compile  compile my code
     [exec]  help     print this help
     [exec]  jar      build my jar
     [exec] Default target: help

BUILD SUCCESSFUL
Total time: 1 second
</pre>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2005/01/28/ant-help-target/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Is that your final answer?</title>
		<link>http://amazing-development.com/archives/2005/01/14/is-that-your-final-answer/</link>
		<comments>http://amazing-development.com/archives/2005/01/14/is-that-your-final-answer/#comments</comments>
		<pubDate>Fri, 14 Jan 2005 10:17:02 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.spychalski.de/blog/archives/2005/01/14/is-that-your-final-answer/</guid>
		<description><![CDATA[I found a nice article about the use of the final keyword in java at IBM Developerworks. Declaring methods or classes as final in the early stages of a project for performance reasons is a bad idea for several reasons. First, early stage design is the wrong time to think about cycle-counting performance optimizations, especially [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>I found a nice <a href="http://www-106.ibm.com/developerworks/java/library/j-jtp1029.html">article</a> about the use of the <tt>final</tt> keyword in java at IBM Developerworks.<span id="more-31"></span></p>
<blockquote><p>Declaring methods or classes as final in the early stages of a project for performance reasons is a bad idea for several reasons. First, early stage design is the wrong time to think about cycle-counting performance optimizations, especially when such decisions can constrain your design the way using final can. Second, the performance benefit gained by declaring a method or class as final is usually zero. And declaring complicated, stateful classes as final discourages object-oriented design and leads to bloated, kitchen-sink classes because they cannot be easily refactored into smaller, more coherent classes.</p>
<p>Like many myths about Java performance, the erroneous belief that declaring classes or methods as final results in better performance is widely held but rarely examined. The argument goes that declaring a method or class as final means that the compiler can inline method calls more aggressively, because it knows that at run time this is definitely the version of the method that&#8217;s going to be called. But this is simply not true. Just because class X is compiled against final class Y doesn&#8217;t mean that the same version of class Y will be loaded at run time. So the compiler cannot inline such cross-class method calls safely, final or not. Only if a method is private can the compiler inline it freely, and in that case, the final keyword would be redundant.</p></blockquote>
<p>didn&#8217;t know that. Guess I will declare less methods <tt>final</tt>. But I think the author is too negative and that <tt>final</tt> can have a place in object-oriented design. I use <tt>final</tt> methods often to enforce a certain behaviour, e.g. to make sure one of my Nodes can only be initialized once I use this init method:</p>
<pre>
private boolean init = false;
public final void init(...) throws NodeException {
  if (init) {
    log.warn("Already initialized! Call to init was ignored.");
    return;
  }
  basicSetup(...);

  try {
    doInit(...);
  } catch (Throwable e) {
    fail("exception in doInit", e);
  }
  init = true;
}
</pre>
<p>Sure, I could leave out the <tt>final</tt> but I couldn&#8217;t imagine a scenario where I would want to extend the <tt>init</tt> in a way I couldn&#8217;t do in <tt>doInit</tt>. And by using <tt>final</tt> I made sure that an unnamed colleague couldn&#8217;t screw up too badly.</p>
<blockquote><p><strong>If you must use final classes or methods, document why</strong><br />
In any event, when you do choose to declare a method or class final, document the reasons why. Otherwise, future maintainers will likely be confused about whether there was a good reason (since there often isn&#8217;t) and will be constrained by your decision without the benefit of your motivation. </p></blockquote>
<p>Another valid point. And I have to plead guilty to not having done this so far. I&#8217;ll try to remember this (and write some docu right now <img src='http://amazing-development.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p>
<p>The rest of the article confirms my thoughts about the use of final fields, at least I was doing the sensible thing here&#8230;</p>
<p>some final words from <a href="http://discuss.joelonsoftware.com/default.asp?design.4.58772#discussTopic58997">JoS</a></p>
<blockquote><p> The final modifier is not about performance enhancement, but about stronger typing and cleaner, clearer code.</p>
<p>You should keep your code in good state at all times, with the correct typing in all scopes.<br />
Dino<br />
Thursday, January 13, 2005 </p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2005/01/14/is-that-your-final-answer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>java memory model</title>
		<link>http://amazing-development.com/archives/2004/12/30/java-memory-model/</link>
		<comments>http://amazing-development.com/archives/2004/12/30/java-memory-model/#comments</comments>
		<pubDate>Thu, 30 Dec 2004 13:42:29 +0000</pubDate>
		<dc:creator>Frank Spychalski</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.spychalski.de/blog/archives/2004/12/30/java-memory-model/</guid>
		<description><![CDATA[just read a little bit about the Java Memory Model. After chapter 7 I was close to throwing the towel &#8211; but luckily, this is where the examples started]]></description>
			<content:encoded><![CDATA[<p>just read a little bit about the <a href="http://www.cs.umd.edu/~pugh/java/memoryModel/jsr133.pdf">Java Memory Model</a>. After chapter 7 I was close to throwing the towel &#8211; but luckily, this is where the examples started <img src='http://amazing-development.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://amazing-development.com/archives/2004/12/30/java-memory-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

