<?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"
	>
<channel>
	<title>Kommentare zu: Spring Properties Reloaded</title>
	<atom:link href="http://www.wuenschenswert.net/wunschdenken/archives/127/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wuenschenswert.net/wunschdenken/archives/127</link>
	<description></description>
	<pubDate>Tue, 07 Feb 2012 16:01:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>Von: axel</title>
		<link>http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4329</link>
		<dc:creator>axel</dc:creator>
		<pubDate>Thu, 01 Dec 2011 09:13:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4329</guid>
		<description>Good observation - the bean's code will actually have to handle synchronization itself. That is, if you want your bean's configuration properties to be changeable during operation, the new value has to be communicated from the thread observing the properties file to the bean instance doing the actual work. So you will have to use a volatile or synchronized keyword at some point.

&lt;p&gt;Using the &lt;a href="https://github.com/axeolotl/SpringPropertiesReloaded/blob/master/src/main/java/net/wuenschenswert/spring/ReconfigurationAware.java" rel="nofollow"&gt;ReconfigurationAware&lt;/a&gt; interface, you can even do this for multiple properties at once, by first storing the new values in a temporary place and then copying the values in one synchronized block in the afterReconfiguration callback.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Good observation - the bean&#8217;s code will actually have to handle synchronization itself. That is, if you want your bean&#8217;s configuration properties to be changeable during operation, the new value has to be communicated from the thread observing the properties file to the bean instance doing the actual work. So you will have to use a volatile or synchronized keyword at some point.</p>
<p>Using the <a href="https://github.com/axeolotl/SpringPropertiesReloaded/blob/master/src/main/java/net/wuenschenswert/spring/ReconfigurationAware.java" rel="nofollow">ReconfigurationAware</a> interface, you can even do this for multiple properties at once, by first storing the new values in a temporary place and then copying the values in one synchronized block in the afterReconfiguration callback.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: ken</title>
		<link>http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4328</link>
		<dc:creator>ken</dc:creator>
		<pubDate>Wed, 30 Nov 2011 03:54:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4328</guid>
		<description>Very interesting!

How do you handle threading and synchronization issue? Your update will most likely occur in a thread that is different from those reading the value. Unless the property's backing field is volatile (for simple value) or Atomic (for complex values), the reading thread can potentially never see the new value, or see a completely different value than the one you are setting!?

Thanks.</description>
		<content:encoded><![CDATA[<p>Very interesting!</p>
<p>How do you handle threading and synchronization issue? Your update will most likely occur in a thread that is different from those reading the value. Unless the property&#8217;s backing field is volatile (for simple value) or Atomic (for complex values), the reading thread can potentially never see the new value, or see a completely different value than the one you are setting!?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: subavinodhini</title>
		<link>http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4283</link>
		<dc:creator>subavinodhini</dc:creator>
		<pubDate>Thu, 04 Feb 2010 07:37:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4283</guid>
		<description>I have one properties file having the value 
totalNumberOfRows=100
if the user changed the value from 100 to 200.It should work accordingly without restatring the server. For that i need to write the spring listener.Do i use the above code for my work.

Suggest me some simplest thing to complete this. :)</description>
		<content:encoded><![CDATA[<p>I have one properties file having the value<br />
totalNumberOfRows=100<br />
if the user changed the value from 100 to 200.It should work accordingly without restatring the server. For that i need to write the spring listener.Do i use the above code for my work.</p>
<p>Suggest me some simplest thing to complete this. <img src='http://www.wuenschenswert.net/wunschdenken/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Melih</title>
		<link>http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4274</link>
		<dc:creator>Melih</dc:creator>
		<pubDate>Wed, 25 Feb 2009 10:18:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4274</guid>
		<description>Thanks, it is well designed and well coded, but it can be rewritten according to spring 2.5 spec.
If I managed that I will let you know it... :)</description>
		<content:encoded><![CDATA[<p>Thanks, it is well designed and well coded, but it can be rewritten according to spring 2.5 spec.<br />
If I managed that I will let you know it&#8230; <img src='http://www.wuenschenswert.net/wunschdenken/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: axel</title>
		<link>http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4272</link>
		<dc:creator>axel</dc:creator>
		<pubDate>Thu, 08 Jan 2009 21:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4272</guid>
		<description>michael: true, but that only works if the injected beans are used through some kind of interface - it will not work for injecting an integer, which is afterwards used for all kinds of computation. A good example is dimension of cache sizes -the cache implementation wouldn't want to go through a service interface every time it needs to determine whether the cache it full, and it will probably use the cache size for allocating resources (e.g. internal arrays) up front.  So reacting to a changed configuration will involve some code implemented in the setter (push style / callback style).</description>
		<content:encoded><![CDATA[<p>michael: true, but that only works if the injected beans are used through some kind of interface - it will not work for injecting an integer, which is afterwards used for all kinds of computation. A good example is dimension of cache sizes -the cache implementation wouldn&#8217;t want to go through a service interface every time it needs to determine whether the cache it full, and it will probably use the cache size for allocating resources (e.g. internal arrays) up front.  So reacting to a changed configuration will involve some code implemented in the setter (push style / callback style).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: Michel Schudel</title>
		<link>http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4271</link>
		<dc:creator>Michel Schudel</dc:creator>
		<pubDate>Thu, 08 Jan 2009 11:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4271</guid>
		<description>More complex cases like maps, list etc. would be simpler if the reloadable implementation is done with proxies instead of an observer. For example, if a "#{...}" is found anywhere in the application context, you can inject a proxy there that retrieves the current property value from the FactoryBean (or from a ReloadableMessageSource, for all I care).</description>
		<content:encoded><![CDATA[<p>More complex cases like maps, list etc. would be simpler if the reloadable implementation is done with proxies instead of an observer. For example, if a &#8220;#{&#8230;}&#8221; is found anywhere in the application context, you can inject a proxy there that retrieves the current property value from the FactoryBean (or from a ReloadableMessageSource, for all I care).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: sridharan</title>
		<link>http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4269</link>
		<dc:creator>sridharan</dc:creator>
		<pubDate>Thu, 06 Nov 2008 11:07:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4269</guid>
		<description>We have property file entries for maxlength and min length.

In many cases these keys are not used in the application.

Is there any way of finding out these keys,.</description>
		<content:encoded><![CDATA[<p>We have property file entries for maxlength and min length.</p>
<p>In many cases these keys are not used in the application.</p>
<p>Is there any way of finding out these keys,.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: axel</title>
		<link>http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4158</link>
		<dc:creator>axel</dc:creator>
		<pubDate>Mon, 14 Jan 2008 23:37:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4158</guid>
		<description>True, the functionality is currently limited: It works well as long as you just have string properties of named singleton beans containing a placeholder. For more complex properties, more complex update code or an even more core-level solution would be required. Handling map and list should be feasible, I think, but the impact of value conversion isn't quite clear to me.

This stuff requires a bit more code reading and thinking.

I recently noticed that properties of inner beans (a bean element contained in a property element) are not reloadable either, because Spring (at least Spring 2) ignores the name of an inner singleton bean. That's always fixable (just move the bean outside and use a ref), but unfortunate.</description>
		<content:encoded><![CDATA[<p>True, the functionality is currently limited: It works well as long as you just have string properties of named singleton beans containing a placeholder. For more complex properties, more complex update code or an even more core-level solution would be required. Handling map and list should be feasible, I think, but the impact of value conversion isn&#8217;t quite clear to me.</p>
<p>This stuff requires a bit more code reading and thinking.</p>
<p>I recently noticed that properties of inner beans (a bean element contained in a property element) are not reloadable either, because Spring (at least Spring 2) ignores the name of an inner singleton bean. That&#8217;s always fixable (just move the bean outside and use a ref), but unfortunate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: David</title>
		<link>http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4154</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 20 Dec 2007 23:41:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4154</guid>
		<description>I made a mistake in my last post of including tags and the site has stripped them. Sorry it was meant to read

Hi, has anyone had difficulties when reloading map or list properties?

It seems that the latest version of spring reloaded cant handle this. The two scenarios are quite different.

1. map.  it looks like the reloader is trying to assign one of the individual property values to the actual map property.

2. list.  no exceptions are thrown here but the list property is re populated with only the property value that was changed. For example if you started with a list of 12 items, after the reload you only have one item</description>
		<content:encoded><![CDATA[<p>I made a mistake in my last post of including tags and the site has stripped them. Sorry it was meant to read</p>
<p>Hi, has anyone had difficulties when reloading map or list properties?</p>
<p>It seems that the latest version of spring reloaded cant handle this. The two scenarios are quite different.</p>
<p>1. map.  it looks like the reloader is trying to assign one of the individual property values to the actual map property.</p>
<p>2. list.  no exceptions are thrown here but the list property is re populated with only the property value that was changed. For example if you started with a list of 12 items, after the reload you only have one item</p>
]]></content:encoded>
	</item>
	<item>
		<title>Von: David</title>
		<link>http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4153</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 20 Dec 2007 23:38:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.wuenschenswert.net/wunschdenken/archives/127#comment-4153</guid>
		<description>Hi, has anyone had difficulties when reloading  or  properties?

It seems that the latest version of spring reloaded cant handle this.  The two scenarios are quite different.

1.    it looks like the reloader is trying to assign one of the individual property values to the actual map property.

2.  no exceptions are thrown here but the list property is re populated with only the property value that was changed. For example if you started with a list of 12 items, after the reload you only have one item


Would be greatful if anyone could help me out here</description>
		<content:encoded><![CDATA[<p>Hi, has anyone had difficulties when reloading  or  properties?</p>
<p>It seems that the latest version of spring reloaded cant handle this.  The two scenarios are quite different.</p>
<p>1.    it looks like the reloader is trying to assign one of the individual property values to the actual map property.</p>
<p>2.  no exceptions are thrown here but the list property is re populated with only the property value that was changed. For example if you started with a list of 12 items, after the reload you only have one item</p>
<p>Would be greatful if anyone could help me out here</p>
]]></content:encoded>
	</item>
</channel>
</rss>

