2 Replies Latest reply on Jul 16, 2007 12:22 AM by EJP

    Updating cache when file is changed.

      Hi all,

      I am working on a "Resource Manager" module in java. What it does is :
      1. Read the configuration file from a location(proerty name/value pair).
      2. Loads the file properties in a cache which holds the in a CachedHashMap as Key-Value pair

      The same config file which it reads looks like this:
                                 <name> MyApp </name>
                                           <name> key1 </name>
                                            <value> value1 </value>
                                           <name> key2 </name>
                                            <value> value2 </value>
      This reading from config file and storing in cache I have already implemented ..

      But now I have a special requirement.. If after deploying the application, I modify the file then Resource Manager should be smart enuf to detect the change and the reloads the file , cleans the cache and updates the cache..

      Can you guys please through an idea on how to achieve the same??? It has to be Server Independent... I mean no JMX..

      a small small code will b more useful..
      Thanks in advance