Clearing resource bundle cache - can it be done? how?

How can I refresh/clear the resource bundle cache?
I'm using JDK1.6 (under Tomact), been trying to use the ResourceBundle.clearCache(); method as indicated in the [International Enhancements in Java SE 6|http://java.sun.com/developer/technicalArticles/javase/i18n_enhance/#cache-expire] article with no effect.
Code example:
ResourceBundle.clearCache();
ResourceBundle bundle = ResourceBundle.getBundle("conf.L10N.portal", ServletActionContext.getContext().getLocale());
...Change the resource bundle file made no effect and the same values kept coming from the cache.
Does the clearCache method works? Am I doing something wrong?
Thanks,
Elad

This works for me:
import java.io.*;
import java.util.*;
public class ResourceBundleTest {
    public static void main(String[] args) throws IOException {
        ResourceBundle res = ResourceBundle.getBundle("res");
        System.out.println(res.getString("foo"));
        System.out.print("edit properties then type any char:");
        int ch = System.in.read();
        ResourceBundle.clearCache();
        res = ResourceBundle.getBundle("res");
        System.out.println(res.getString("foo"));
}Could you need the version that takes a class loader? Have you tried using timetolive?

Similar Messages

  • Bbc homepage not loading, even though I cleared cookis and cache. Any advice on how to sort this problem?

    I have FF version 4. The BBC home page will no longer load, though I can load other BBC pages such as BBC news. I don't know why it won't load and I just get a blank white page - t loads in safari fine. I have cleared cookies and cache but it makes no difference. Please advise on next steps for trying to sort.
    thanks

    Are of your purchases done under a single Apple ID/iTunes Account?  Perhaps this article can provide a resolution.
    iTunes repeatedly prompts to authorize computer to play iTunes Store purchases
    B-rock

  • How can I turn off tabbed browsing in Firefox 4.0 running in windows 7? I don't want tabs at all. If it can't be done, how can I go back to a previous version?

    I upgraded to 4.0 and now everything wants to open in a new tab. I don't want tabs at all. How do I turn them off? I have to use IE at work and have no problem turning off tabs there, but I haven't found the way to get rid of tabs in Firefox 4.0.

    That is not standard behavior. You may have installed an extension that causes it.
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • How to cache external resource bundles?

    Hi,
    I am using Build JDEVADF_11.1.1.4.0_GENERIC_101227.1736.5923 on Windows 7.
    We have used external resource bundle for our ADF application using loadbundle which extends java.util.ListResourceBundle.
    Is there any way to cache these external resource bundles? and If yes when/how it will get cached?
    We have found following link:
    http://www.orastudy.com/oradoc/selfstu/fusion/web.1111/b31974/appendixa.htm (Section: A.11 adf-config.xml)
    But not sure if it will help for external resource bundles.
    Any pointers will be highly appreciated.
    Thanks
    Vishal

    Hi again.
    To achieve your requeriment you can try next solutions:
    - Add a external path where you are going to let your Resource Bundle in your Manage Server Classpath. For example: /language (into this folder put your baseName folder's and properties file).
    - Build your custom Java Class to load Resource Bundle in a configured classpath or path.
    - Try to do a similar solution like WebCenter Spaces copying your resource bundle in MDS path and updating/getting it with WSLT scripts.
    Regards.

  • A simple team task with a single team resource; yet in reality many actual team contributions - can it be done?

    What people would like to be able to do is to plan for a task in MSP to be done by a team. We plan how much work is involved and the duration.
    Any number of team members can be involved in the task. As things delay and get put on hold we may have entire teams jumping in to complete tasks so utilisation is maximised. PMs do not want to open an plan every half hour to add extra resources to
    plans
    Can this be done in MSP in an elegant way?
    What I am currently doing is asking PMs to assign all 20 generic team resources to a task; so any of the 20 team members can assign themselves to the task in the TimeSheet. (In fact they get templates with this setup: there is a join project team task with
    every generic team resource added so they can swap themselves into the plan)
    Obviously the PMs are aghast that Project server will not let you assign a single team resource and then allow anyone in the team to join in. Am I correct in thinking Project Server will not allow this.
    (Project server 2010 - on premise)
    Trying to stop the swap to Salesforce - but the errors keep a coming

    Yeah the capacity planning is mathematically fine if I know the cumulative total of work across a duration - project just flattens it across however many resources are assigned.
    To max utilisation resources can and will be shunted onto projects; in a week they can be put onto 20 projects to fill out the utilisation if a big project suffers a major delay. The PMs cannot spend the time rescheduling 10 plans. The resource want
    to easily record time sheeted data against the projects they worked on in the past days.
    Whilst "add to task" works and they all know how to use it; it only lists the projects they are a Published resource on. Even being reassigned onto a team task will not help. i.e. if I set up tasks on each and every template with the 20 spare generic
    team resources on; if a team resource grabs that 1 task to be assigned - the PM must
    1. accept the reassignment;
    2. Open and Publish the plan; only then can that resource add themselves to a task in the plan - PMs can't spend time doing this 20 times per project!
    I don't really want every resource seeing every project in the "add to task" list - but it looks like this is what I will have to do as the team tasks seems broken in many, many places.
    However we already do it for support projects; everyone (who may contribute at any point to a support item) is assigned to an initial task - this makes the project list unwieldy in Add task or new task and adds clutter for the user
    Trying to stop the swap to Salesforce - but the errors keep a coming

  • resource-bundle tag of portlet.xml

    Hi.
    I'd like to use resource bundle. Therefore I add following tags inside <portlet> tag of portlet.xml and create 'testprofile.properties' file.
    <resource-bundle>testprofile</resource-bundle>
    But when I start tomcat, the error occured like following.
    2004-08-05 12:01:45,437 ERROR [main]
    java.lang.NullPointerException
    at java.io.Reader.<init>(Reader.java:61)
    at java.io.InputStreamReader.<init>(InputStreamReader.java:80)
    at java.util.Properties.load(Properties.java:189)
    at java.util.PropertyResourceBundle.<init>(PropertyResourceBundle.java:96)
    at com.plumtree.portlet.util.PortletInfo.addPropertyBundles(PortletInfo.java:425)
    at com.plumtree.portlet.servlet.PortletServlet.digestPortletXml(PortletServlet.java:527)
    at com.plumtree.portlet.servlet.PortletServlet.initDigester(PortletServlet.java:651)
    at com.plumtree.portlet.servlet.PortletServlet.init(PortletServlet.java:60)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex ...
    So I modified portlet.xml like following and try to start tomcat again.
    <resource-bundle>testprofile.properties</resource-bundle>
    Tomcat can be started successfully.
    But when I display the portlet, error occured.
    java.util.MissingResourceException: Can't find resource for bundle com.plumtree.portlet.util.PortletResourceBundle, key LogLevel at java.util.ResourceBundle.getObject(ResourceBundle.java:314) at java.util.ResourceBundle.getString(ResourceBundle.java:274) at portlet.TWNewMailPortlet.init(TWNewMailPortlet.java:45) at com.plumtree.portlet.servlet.BaseServlet.init(BaseServlet.java:522) at com.plumtree.portlet.servlet.PortletServlet.service(PortletServlet.java:136)
    The properties file 'testprofile.properties' is not loaded successfully, maybe.
    Do you know how to specify or use ResouceBundle in using Plumtree JSR168?
    The tips of source code is following
    In Portlet class which extends GenericPortlet
    public void init(PortletConfig config) throws PortletException {  super.init(config);  PortletLogger.init("Test", getPortletContext());  ResourceBundle rb = getResourceBundle(Locale.getDefault());  for (Enumeration e = rb.getKeys(); e.hasMoreElements(); ) {   String str = (String)e.nextElement();   System.out.println(str);  } String level = rb.getString("LogLevel"); PortletLogger.setLevel(level); }

    Are you naming your resource bundles something like:
    1. messages_en.properties (for English)
    2. messages_de.properties (for German)
    and so on.
    Also, do you include these properties files in your final deployment package, because if they're not there then the messages won't be displayed.

  • Skin's resource bundle

    Hello,
    I'm using the Oracle skin in an ADF application. I would need a new "skin's resource bundle" for an unsupported locale. How could I do it? Which is the name of the Oracle Resource bundle class (or properties file)?
    Thanks in advance!

    Thank you again!
    I'm using JDeveloper 10g.
    First, I've created a custom resource bundle (com.ieci.mugeju.view.resource.MugejuResourceBundle) and overrided the default resource string values.
    Second, I've created the file adf-faces-skins.xml like this:
    <?xml version="1.0" encoding="windows-1252" ?>
    <skins xmlns="http://xmlns.oracle.com/adf/view/faces/skin">
    <skin>
    <id>MugejuSkin</id>
    <family>MugejuSkin</family>
    <render-kit-id>oracle.adf.desktop</render-kit-id>
    <bundle-name>
    com.ieci.mugeju.view.resource.MugejuResourceBundle
    </bundle-name>
    </skin>
    </skins>
    Third, I set the skin-family property of the file adf-faces-config.xml to 'MugejuSkin'.
    If I follow all these steps, I achieve to change the text in ADF Faces components, as I wanted, but I lost the oracle styles (skin-family = oracle) that I had before following these steps.
    I must be doing someting wrong. I would like both, to mantain the oracle styles and to change the text in ADF Faces components.
    Thank you very much.

  • How to configure resource bundle in facescontext.xml in JSF

    I have to take each label from the resource bundle in my web application, so how to configure resource bundle in JSF and how to use it, so please help me.....

    Follow the below mentioned steps ::
    1) make a properties file say mymessages.properties alongwith your java files. Put content like
    click=Click Me !!!
    #where click is the key and Click Me !!! is the actual value that needs to be displayed
    2) Add in faces-config.xml like this ::
    <application>
              <message-bundle>mymessages.mymessages</message-bundle>
         </application>     
    3) Use in your jsp page like this ::
    <f:view>
    <f:loadBundle basename="mymessages/mymessages" var="msg"/>
    hello :: <h:commandButton value="#{msg.click}" onclick="callJavaMethod()"></h:commandButton>
    </f:view>

  • How to set title of jsp page from resource bundle

    hi ,
    How to set title of jsp page from resource bundle....

    Depends on how you configured and declared the resourcebundle in your JSP. The usual way is just<title>${resourceBundle.messageKey}</title>

  • Hulu says I may need to clear my browser cache--how is this done? Any comments appreciated.

    Hulu programs stop and screen message says I may have to clear my browser cache. Does this sound reasonable? How do I do that?

    I don't use Hulu, so I don't know whether clearing your cache will help...
    You can open the Options dialog from the orange Firefox button or the Tools menu:
    Options dialog > Advanced > Network > Offline Storage: "Clear Now"
    ''Or you can use''
    Tools > Clear Recent History
    ''but take care not to clear other history you want to save.''

  • I used to be a softbank Japan Iphone 4 customer and i had cleared all the dues. Now i don't have softbank contract and i am in my country Nepal. How can i unlock and use my Iphone here in Nepalese Network ?

    I used to be a softbank Japan Iphone 4 customer and i had cleared all the dues. Now i don't have softbank contract and i am in my country Nepal. How can i unlock and use my Iphone here in Nepalese Network ?

    Hi Edward,
    You should still be able to manually manage the music on your iPhone within iTunes. Make sure that when your iPhone is plugged in, look in the Summary tab to see if “Manually manage music and videos” is enabled and you can even you turn off Automatically Sync when this iPhone is connected. Take a look at the first article below to give more information on that. As far as your other questions about calling someone, I have provided two options for you. If it is for feedback on iTunes, you can use the second link to give detailed feedback on what is going on. If you want to actually talk to someone, the last link has a list of numbers for you to call for any support or service that you may need.  
    Manage content manually on your iPhone, iPad, and iPod
    http://support.apple.com/en-us/HT201593
    Product Feedback
    http://www.apple.com/feedback/
    Contact Apple for support and service
    http://support.apple.com/en-us/HT201232
    Take it easy,
    -Norm G. 

  • How can we set page title from resource bundle

    Hi friends ,
    how can we set page title from resource bundle,
    <%--
        Document   : MARC008Music
        Created on : Aug 4, 2008, 6:27:06 PM
        Author     : root
    --%>
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
    <title>All Transaction Log Details </title>
          </head>
        <body>
            <f:view>
                <f:loadBundle basename="#{utility.resourceBundle}" var="rb"/>
                <f:loadBundle basename="#{utility.messageBundle}" var="mb"/>
                <h:form>
                </h:form>
            </f:view>
        </body>
    </html>i want set title( All Transaction Log Details ) from resource bundle.

    My problem is solved , Thanking you Sir.
    Thanks & Regards,
    Edukondalu Avula

  • How can I clear the DNS cache?

    I haven't been able to connect to my local Library since January.  When I key in the URL, it starts the access routine and then after about 20 minutes, I have to kill it because nothing happens.  I contacted the IT folks at the library and was told that they had made a few changes around the time my problem began so maybe the DNS cache was still pointing at the old info.  He recommended that I enter TERMINAL mode and try to clear the DNS cache, using  "sudo dscacheutil -flushcache" command.   .  I attempted this several times, even changing my applid password, and kept getting invalid responses.

    I did try that and after a few trys it finally worked.  It took quite awhile for the window for the library to finally come up, but it did and I am now able to get in and out with no problems with my library access.  Now when I call up my bank, parts of it don't come up and it kicks me out.  Now, I'll have to search for what fixes that - as it has happened before, so I know it's fixable.  Thanks for you help though.

  • HT201263 I was trying to restore my ipod to it's original factory settings. I can't restore it because i don't have permission request a permitted resource. What can i do in this situation?

    I was trying to restore my ipod to it's original factory settings. I can't restore it because i don't have permission request a permitted resource. What can i do in this situation?

    What is the exact wording of this error message?  Perhaps it's one of the errors listed in this article.
    iOS: Resolving update and restore alert messages
    B-rock

  • How can i clear my java cache?

    I don't know where to go or what to do to clear my java cache. Help, please?

    Hello jeaniedumdum, see : https://www.java.com/en/download/help/plugin_cache.xml
    thank you

Maybe you are looking for

  • H430 CPU Upgrade

    Bit irritated now. I know I have a h61 Chipset, but there is NO information online about the lenovo "Mahobay" motherboard. None. Nada. I have no idea whether my motherboard is capable of any upgrades, LET ALONE a new CPU, as my crappy Pentium G640 is

  • 2014 Macbook Air + guitar overdubs

    Hello, I am tempted to purchase the new 2014 Macbook Air (11-inch). My question: will the machine be able to handle multitrack recording in Garageband? Obviously disk space will be an issue, but that is ok. And obviously the 8GB ram upgrade would be

  • Capture problem with Prem Elements 4

    When I capture video from a Sony digital 8 Handycam, it drops part of it. If I capture 30 minutes of video, when I stop capture it only shows the last 8 or so minutes and the first 22 minutes are dropped and can't be found. I can make it work if i ca

  • Query Need

    Dear all, I have a table in the name of employees setting emp_id as a primary key in primary database (1st machine). Say if im trying to insert the data from two machines (2nd & 3rd) at the same time, the datas are inserting only once.Say from machin

  • Volnoti - Lightweight Volume Notification

    Hey guys, Let me share a little piece of code I've put together recently. I'm using XMonad and one thing all the lightweight window managers always lacked was a nice notification when the volume is changed. What I'm specially fond of is the Apple-lik