Guys i have created a properties file outside the jboss classpath
(I kept outside because i can change during runtime and the values will be reflected).
I am loading this property file (like System.getProperty("jboss.base.dir.home")
) everytime to do rmi lookup .I think that everytime loading the same file, eventhough it is not changed is pain.
I want ideas , how to detect the change in properties file and load only when there is a change.i thought of having the timestamp of lastmodified .kindly let me know your suggestions.
You could reuse Apache commons to read the property file : http://commons.apache.org/configuration/userguide/howto_filebased.html#Automatic_Reloading
OR
You could do it programatillcay yourself. This would reimplementing the apache commons code - probably with far less testing and more error prone. If you insist on this approach here is that I think you can do :
Properties
instance.File
class)Properties
instance. Remember this must be done in isolation (i.e change the object when no ones accessing it).HTH