commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas De Loof <nicolas.del...@capgemini.com>
Subject [configuration] StackOverflow when using a custom reloading strategy
Date Fri, 29 Jul 2005 13:18:29 GMT

Hello,

I'm trying to setup a custom reloading strategy (based on JMX management 
command).
My reloadingRequired() implementation uses an internal boolean to ask 
for reload. On reloadingPerformed(), I set this boolean to false.

I get StackOverflowException because addPropertyDirect() method uses 
getProperty, that itself check for reload. This requires me to set my 
internal boolean to false at first reloadingRequired invocation after 
reloading has been asked.

IMHO AbstractFileConfiguration should use a 'reloading' flag to avoid 
such case.

It would also be great not to lock access to properties during file 
reload. I've made a simple configuration tool that was using a temporary 
Map during loading and replaced the internal one when reload succeded. 
In current implementation, I think if an IOException occurs, the 
properties have allready been cleared, and the configuration is broken.

Nico.

This message contains information that may be privileged or confidential and is the property
of the Capgemini Group. It is intended only for the person to whom it is addressed. If you
are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,
 distribute, or use this message or any part thereof. If you receive this  message in error,
please notify the sender immediately and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message