Loading properties file in wbelogic without restarting the server

I need some help regarding loading properties files in Weblogic without restarting the server. Here are details for the same :

All the text on our site is referred to as Screencopies that are used for localisation. In the code the screen copies are accessed through ResourceManager. This data is kept in locale based properties file which are about 400KB each (4 locales). These properties files are loaded at the time of Weblogic start up.

Currently we are loading these properties files through weblogic class loader at the startup.

Weblogic servers have to be restarted for any change in these files. It is not possible for us to restart the servers frequently. How can we make frequent changes to Screencopies, which means that we should be able to deploy these files at run time without restarting the weblogic servers.

The version of weblogic we are using is as below
Weblogic 8.1 Sp4 on windows 2003 , using JDK 1.4.2

Regards
Om
osinghAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rama_krishna580Commented:
Hi,

Even If you do HOT deployment, the properties file will be reflected in weblogic only after restarts the server. Because it will not point to the new instance of the resource bundle, while server is running if you put new props. file it won;t take until you restart the server...

R.K

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ECollinCommented:
Hi,

1.your application can scan the file system to detect new versions of the file

2.You can write your own classloader with automatic configuration file reloading.

Emmanuel
anokun7Commented:
Hi Om,

We are doing exactly that. What we do is we use a FileListener to check the changes in the file.

Also initially we worked around this by creating a new object everytime the properties file was referenced - something like this:

                Properties p = new Properties();
            InputStream is = CSVReportCreation.class.getClassLoader().getResourceAsStream("one.properties");
            p.load(is);

The above code was in the constructor of the class (Reports in our case).
So evertime a new object is created - the new one.properties file was loaded w/o requiring to restart weblogic.

Hope that helps,
Anoop
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.