0 Replies Latest reply: Dec 7, 2012 7:20 AM by Sašo C. RSS

    Problem refreshing resource bundle from DB table for BC (JDev

    Sašo C.
      In our ADF application we are loading bundles form the database, which is not working as expected.

      The problem is that when we want to refresh the bundle, it doesn't work for values on Model (BC) components. Bundles values stay the same.
      Bundle refresh was implemented by this example

      We then found that if we put f:loadBundle element on the page, the refresh does execute.
      But only for the ViewController, Model bundles do not refresh.

      On top of every page we have <f:loadBundle basename="si.bron.susa.view.util.ArsoVinBundle" var="res"/>
      On every page we also have a button. Click on it should refresh the bundle by calling the following code:

      public void forceBundleRefresh() {
      try {
      sLog.info("Resourcebundle.clearCache executed succesfully.");
      } catch (Exception e) {
      sLog.info("Resourcebundle.clearCache cannot be used because jdk version is not 1.6 or higher, try old approach");
      System.out.println("Catch bundlov");
      // try old approach
      for (String resourcebundle : bundleNames) {
      for (String contextDimensionValue : contextDimensionValues) {
      String bundleName = resourcebundle + contextDimensionValue;
      System.out.println("Bundle123: "+ bundleName);
      } //for

      Executing this code the bundles of ViewController is always refreshed from DB, but bundles of BusinessComponents are refreshed ONLY FIRST TIME after application is deployed on WebLogic. Next attempts after the first one, don't perform refresh.

      I think it should behave same for BC and VC bundles, isn't it?
      If I am wrong please direct me to some example.

      Sašo Celarc