<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: The Final Take On Java System Properties</title>
	<atom:link href="http://techblog.molindo.at/2009/11/java-system-properties.html/feed" rel="self" type="application/rss+xml" />
	<link>http://techblog.molindo.at/2009/11/java-system-properties.html</link>
	<description>Molindo Techblog - formerly known as talk-on-tech.blogspot.com</description>
	<lastBuildDate>Thu, 09 Sep 2010 16:16:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Steve Chaloner</title>
		<link>http://techblog.molindo.at/2009/11/java-system-properties.html/comment-page-1#comment-6083</link>
		<dc:creator>Steve Chaloner</dc:creator>
		<pubDate>Fri, 11 Dec 2009 11:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.molindo.at/?p=147#comment-6083</guid>
		<description>I think I need to collate what I&#039;ve written here and update the project site.  Thanks for the discussion :)</description>
		<content:encoded><![CDATA[<p>I think I need to collate what I&#8217;ve written here and update the project site.  Thanks for the discussion <img src='http://techblog.molindo.at/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Fußenegger</title>
		<link>http://techblog.molindo.at/2009/11/java-system-properties.html/comment-page-1#comment-6082</link>
		<dc:creator>Stefan Fußenegger</dc:creator>
		<pubDate>Fri, 11 Dec 2009 11:29:01 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.molindo.at/?p=147#comment-6082</guid>
		<description>Okay, so now it all comes together. Actually, it sound nice. I could have used it for some groovy scripts :)</description>
		<content:encoded><![CDATA[<p>Okay, so now it all comes together. Actually, it sound nice. I could have used it for some groovy scripts <img src='http://techblog.molindo.at/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Chaloner</title>
		<link>http://techblog.molindo.at/2009/11/java-system-properties.html/comment-page-1#comment-6081</link>
		<dc:creator>Steve Chaloner</dc:creator>
		<pubDate>Fri, 11 Dec 2009 11:24:20 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.molindo.at/?p=147#comment-6081</guid>
		<description>Hi Stefan,

PropertySetter#process(..) is the entry point to traverse the variables of an object/class - see my original post for an example.

Most of my projects involve Spring, but a few small ones don&#039;t and I don&#039;t want to have to a) use Spring or b) set the properties and do the type conversion by hand - that&#039;s where objectify-led (need to find a shorter name...) comes in handy.

One other advantage (which I haven&#039;t written yet) is automatic help generation on the command line.  Since all properties which can be set are annotated, they can automatically be discovered and printed out.  Hope to get around to implementing this at the weekend.</description>
		<content:encoded><![CDATA[<p>Hi Stefan,</p>
<p>PropertySetter#process(..) is the entry point to traverse the variables of an object/class &#8211; see my original post for an example.</p>
<p>Most of my projects involve Spring, but a few small ones don&#8217;t and I don&#8217;t want to have to a) use Spring or b) set the properties and do the type conversion by hand &#8211; that&#8217;s where objectify-led (need to find a shorter name&#8230;) comes in handy.</p>
<p>One other advantage (which I haven&#8217;t written yet) is automatic help generation on the command line.  Since all properties which can be set are annotated, they can automatically be discovered and printed out.  Hope to get around to implementing this at the weekend.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Fußenegger</title>
		<link>http://techblog.molindo.at/2009/11/java-system-properties.html/comment-page-1#comment-6080</link>
		<dc:creator>Stefan Fußenegger</dc:creator>
		<pubDate>Fri, 11 Dec 2009 11:13:12 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.molindo.at/?p=147#comment-6080</guid>
		<description>Hi Steve,

there&#039;s nothing too spectacular in this class. But when and how is PropertySetter#process(..) invoked? But don&#039;t get me wrong. Your project looks nice. However, it&#039;s mostly a subset of Spring&#039;s functionality - and Spring is what I&#039;m already using on a daily basis.

I know that my enum isn&#039;t suited for project-specific properties. That never was it&#039;s intention. I&#039;m not even sure about using an enum. But the &quot;how&quot; is not important anyway. My main objective was documentation on the one hand and getting rid of string constants on the other hand. Both in order to leverage IDE capabilities such as autocompletion and inline Javadoc.</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>there&#8217;s nothing too spectacular in this class. But when and how is PropertySetter#process(..) invoked? But don&#8217;t get me wrong. Your project looks nice. However, it&#8217;s mostly a subset of Spring&#8217;s functionality &#8211; and Spring is what I&#8217;m already using on a daily basis.</p>
<p>I know that my enum isn&#8217;t suited for project-specific properties. That never was it&#8217;s intention. I&#8217;m not even sure about using an enum. But the &#8220;how&#8221; is not important anyway. My main objective was documentation on the one hand and getting rid of string constants on the other hand. Both in order to leverage IDE capabilities such as autocompletion and inline Javadoc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Chaloner</title>
		<link>http://techblog.molindo.at/2009/11/java-system-properties.html/comment-page-1#comment-6079</link>
		<dc:creator>Steve Chaloner</dc:creator>
		<pubDate>Fri, 11 Dec 2009 11:01:10 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.molindo.at/?p=147#comment-6079</guid>
		<description>Hi Stefan,

take a look at http://objectify-led.googlecode.com/svn/trunk/src/main/java/be/objectify/led/PropertySetter.java and you&#039;ll see how the annotations are processed.

I like your approach for well-known properties, but for arbitrary properties it would require either the developer to update the class manually and then have to merge in your future updates, or for you to add properties from potentially proprietary projects to the enum.  

Personally, I would (and will) use your SystemProperty enum for well-known props (don&#039;t re-invent the wheel!) and objectify-led for project-specific properties.</description>
		<content:encoded><![CDATA[<p>Hi Stefan,</p>
<p>take a look at <a href="http://objectify-led.googlecode.com/svn/trunk/src/main/java/be/objectify/led/PropertySetter.java" rel="nofollow">http://objectify-led.googlecode.com/svn/trunk/src/main/java/be/objectify/led/PropertySetter.java</a> and you&#8217;ll see how the annotations are processed.</p>
<p>I like your approach for well-known properties, but for arbitrary properties it would require either the developer to update the class manually and then have to merge in your future updates, or for you to add properties from potentially proprietary projects to the enum.  </p>
<p>Personally, I would (and will) use your SystemProperty enum for well-known props (don&#8217;t re-invent the wheel!) and objectify-led for project-specific properties.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Fußenegger</title>
		<link>http://techblog.molindo.at/2009/11/java-system-properties.html/comment-page-1#comment-5924</link>
		<dc:creator>Stefan Fußenegger</dc:creator>
		<pubDate>Wed, 02 Dec 2009 08:08:53 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.molindo.at/?p=147#comment-5924</guid>
		<description>Hi Steve,

First, sorry that I&#039;ve forgotten to approve your comment yesterday. Personally, I&#039;m not interested as I&#039;m normally using Spring for what you describe. And if not, compared to 

@Property(&quot;user.country&quot;);
private String country = &quot;US&quot;;

using

private String country = SystemProperty.USER_COUNTRY.get(&quot;US&quot;);

looks far less ... frightening :) 

How do you process the annotations? I couldn&#039;t find that information on your site.</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>First, sorry that I&#8217;ve forgotten to approve your comment yesterday. Personally, I&#8217;m not interested as I&#8217;m normally using Spring for what you describe. And if not, compared to </p>
<p>@Property(&#8220;user.country&#8221;);<br />
private String country = &#8220;US&#8221;;</p>
<p>using</p>
<p>private String country = SystemProperty.USER_COUNTRY.get(&#8220;US&#8221;);</p>
<p>looks far less &#8230; frightening <img src='http://techblog.molindo.at/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>How do you process the annotations? I couldn&#8217;t find that information on your site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Fußenegger</title>
		<link>http://techblog.molindo.at/2009/11/java-system-properties.html/comment-page-1#comment-5917</link>
		<dc:creator>Stefan Fußenegger</dc:creator>
		<pubDate>Tue, 01 Dec 2009 18:54:58 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.molindo.at/?p=147#comment-5917</guid>
		<description>Hi Christopher, 

thanks for your input. I&#039;ve added the get(String) method. Additionally, I&#039;ve added some convenience methods that convert the String: getInteger(String), getLong(String), getBoolean(String), getFloat(String), getDouble(String), getFile(String) (all with a no-argument alternative and a corresponding setter). 

I&#039;m also thinking about uploading the result as a Maven artifact as soon as my work is done. This way, it can easily be included in any project.</description>
		<content:encoded><![CDATA[<p>Hi Christopher, </p>
<p>thanks for your input. I&#8217;ve added the get(String) method. Additionally, I&#8217;ve added some convenience methods that convert the String: getInteger(String), getLong(String), getBoolean(String), getFloat(String), getDouble(String), getFile(String) (all with a no-argument alternative and a corresponding setter). </p>
<p>I&#8217;m also thinking about uploading the result as a Maven artifact as soon as my work is done. This way, it can easily be included in any project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Chaloner</title>
		<link>http://techblog.molindo.at/2009/11/java-system-properties.html/comment-page-1#comment-5915</link>
		<dc:creator>Steve Chaloner</dc:creator>
		<pubDate>Tue, 01 Dec 2009 11:53:56 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.molindo.at/?p=147#comment-5915</guid>
		<description>You might also be interested in objectify-led : http://www.objectify.be/objectify-led/

It handles assignment of properties using, amoung other things, system properties, properties files or arbitrary data sources.  Type conversion is also handled.

public class Foo
{
    @Property(&quot;blah.value&quot;);
    private static String BLAH = &quot;default-value&quot;;

    @Property(&quot;mystring.value&quot;);
    private String myString;

    @Property(&quot;myint.value&quot;);
    private int myInt = -1;

    public static void main(String[] args)
    {
        Foo foo = new Foo();
        new PropertySetter().process(foo);
    }
    ...
}</description>
		<content:encoded><![CDATA[<p>You might also be interested in objectify-led : <a href="http://www.objectify.be/objectify-led/" rel="nofollow">http://www.objectify.be/objectify-led/</a></p>
<p>It handles assignment of properties using, amoung other things, system properties, properties files or arbitrary data sources.  Type conversion is also handled.</p>
<p>public class Foo<br />
{<br />
    @Property(&#8220;blah.value&#8221;);<br />
    private static String BLAH = &#8220;default-value&#8221;;</p>
<p>    @Property(&#8220;mystring.value&#8221;);<br />
    private String myString;</p>
<p>    @Property(&#8220;myint.value&#8221;);<br />
    private int myInt = -1;</p>
<p>    public static void main(String[] args)<br />
    {<br />
        Foo foo = new Foo();<br />
        new PropertySetter().process(foo);<br />
    }<br />
    &#8230;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Deckers</title>
		<link>http://techblog.molindo.at/2009/11/java-system-properties.html/comment-page-1#comment-5896</link>
		<dc:creator>Christopher Deckers</dc:creator>
		<pubDate>Sat, 28 Nov 2009 20:54:52 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.molindo.at/?p=147#comment-5896</guid>
		<description>I have added the following method:
public String get(String defaultValue);

It allows to specify the default value to return when the value of the property is null. It calls:
System.getProperty(getName(), defaultValue);

-Christopher</description>
		<content:encoded><![CDATA[<p>I have added the following method:<br />
public String get(String defaultValue);</p>
<p>It allows to specify the default value to return when the value of the property is null. It calls:<br />
System.getProperty(getName(), defaultValue);</p>
<p>-Christopher</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Deckers</title>
		<link>http://techblog.molindo.at/2009/11/java-system-properties.html/comment-page-1#comment-5892</link>
		<dc:creator>Christopher Deckers</dc:creator>
		<pubDate>Sat, 28 Nov 2009 11:33:22 +0000</pubDate>
		<guid isPermaLink="false">http://techblog.molindo.at/?p=147#comment-5892</guid>
		<description>Here is a list of settable properties (some have to be set very early to have an effect):

&quot;sun.awt.disableMixing&quot; (for Sun VM on Java 6u14+)
&quot;sun.awt.noerasebackground&quot;
&quot;sun.awt.xembedserver&quot;

By-the-way, I love this idea of an enum for all properties, and I will probably create a similar enum for my application-specific properties!

Keep up the good work.
-Christopher</description>
		<content:encoded><![CDATA[<p>Here is a list of settable properties (some have to be set very early to have an effect):</p>
<p>&#8220;sun.awt.disableMixing&#8221; (for Sun VM on Java 6u14+)<br />
&#8220;sun.awt.noerasebackground&#8221;<br />
&#8220;sun.awt.xembedserver&#8221;</p>
<p>By-the-way, I love this idea of an enum for all properties, and I will probably create a similar enum for my application-specific properties!</p>
<p>Keep up the good work.<br />
-Christopher</p>
]]></content:encoded>
	</item>
</channel>
</rss>
