You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ma...@sanofi-aventis.com on 2008/09/16 11:17:32 UTC

Any way to reload a resource bundle?

Hi,

 

Is there any way to reload a resource bundle without reloading the
application, in my case this means restarting the server since the
context reload always fails.

 

I've tried this little bit which I found on the Sun Java forums but it
doesn't seem to do anything. Not sure if it's a JSF thing or if this
doesn't work at all. I haven't actually tried it in a standalone Java
application

 

 

            Field cacheList =
ResourceBundle.class.getDeclaredField("cacheList");

            cacheList.setAccessible(true);

            ((Map)cacheList.get(null)).clear();

            cacheList.setAccessible(false);

 

Thanks,

Matt