How to serialize a resource bundle.

Hi all,
I ran into this problem , which i should call as a design problem. We had the resourcebundles saved in the session attributes.
But when we moved to a clustered environment I found that resourcebundle wasn't serializable and I found tons of java.io.NotSerializableException.
So is there any way to make this resourceBundle serializable.
Thanks in advance!!!!
Reena

[useful link|http://www.google.com/search?rlz=1C1GGLS_en-USZA293ZA350&sourceid=chrome&ie=UTF-8&q=resourcebundle+serializable]
The link above takes you to links that contain stuff like
public class SerializableResourceBundle extends ResourceBundle implements java.io.Serializable
{ private ResourceBundle rb; ...
There should be a way of extending ResourceBundle to do what you need; and then you would just do a find and replace of ResourceBundle with your new SerializableResourceBundle throughout your codebase.
Edited by: Ilan Pillemer on Aug 30, 2010 8:13 PM

Similar Messages

  • How to link the resource bundle in JSF implemented in  eclipse?

    Kindly help me out

    This is how I called the resource bundle in JSF
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <f:view>
    <f:loadBundle basename="constantsUIProp" var="prop"/>
    <h:form>
    <h:inputText maxlength="#{prop.AREA_CODE_MAX}"></h:inputText>
    </h:form>
    </f:view>
    </body>
    </html>
    when i tend to build, it shows an error like+ Resource bundle cannot be found on the classpath+
    I have saved the resource bundle in WebContent/Web-Inf/classes/constantsUIProp

  • How to use common resource bundle across all the development components ?

    Hi,
    I am working on SAP NetWeaver Developer Studio - JAVA
    How to use common resource bundle across all the development components ?
    Description :
    I have a requirement of creating a resource bundle (resource.properties) and use that common resource bundle in all the development components.
    Can we create a  development component (war and ear both) and create only resource.properties in this development component( DC ) and create the dependency of the same DC  in all the other DCs ?
    Thanks,
    Neha

    Hello Neha 
    This question is more NWDS related.
    You may have a better chance of someone answering the thread under
    SAP Netweaver -> SAP NetWeaver Development Infrastructure (NWDI, formerly known as JDI) forum
    Thanks
    Kenny

  • How to deal with resource bundle in multiple applications system

    Hi all,
    I'm building new system depend on the method of
    one common model with multiple applications for the view objects
    my JDeveloper version 11.1.2.3
    my Question
    How can i merge the resource bundle for these applications
    as in the common model exists file for resouce bundle
    and each other applications contains resource bundle files how can i merge all these file in one Resource bundle file ?
    Edited by: 985756 on Apr 2, 2013 12:39 AM

    Hi,
    Please check anerjusb blog for your answer
    Hoping this will help you.
    http://andrejusb.blogspot.in/2009/12/reusing-resource-bundles-from-different.html
    Thanks & Regards,
    Vikas

  • How to use a resource bundle in viewcontroller project

    How can I create a resource bundle for a viewcontroller project ? Is there any way to add entries to it other than adding manually editing the property file ? so that all the key generated will be unique? How to access a message in the resource bundle in my backing bean so that I can display it in my screen ?
    Thanks
    Suneesh

    Suneesh Raman wrote:
    How to access a message in the resource bundle in my backing bean so that I can display it in my screen ?Take a look at this: http://adfcodebits.blogspot.com/2010/04/bit-5-accessing-resource-bundle-from.html

  • How to merge two resource bundle values ?

    Hi All,
    JDev ver : 11.1.1.7
    I want to merge two resource bundle values.. How to do it ?
    like this #{expr ? str1 : str1 + str2}
    I tried like the one below and used some jstl fuctions... but no use not worked.. got some parse exception, compilation exception,etc..
      <af:outputText value="#{ row.accountName eq 'AccountName9' ? resource['LBL_WELC'] : resource['LBL_WELC'] + resource['LBL_HOME'] }"/>
    Let me know how to do this ?
    Regards,
    Gopi

    The above outputtext is an example, I may use diff bundle keys like below,
    <af:outputText value="#{ row.accountName eq 'AccountName9' ? resource['LBL_TEST'] : resource['LBL_KEY1'] + resource['LBL_KEY2'] }"/>
    The principle is the same
    <af:outputText value="#{ row.accountName eq 'AccountName9' ? resource['LBL_TEST'] : '' }#{ row.accountName eq 'AccountName9' ? '' : resource['LBL_KEY1'] }#{ row.accountName eq 'AccountName9' ? '' : resource['LBL_KEY2'] }"/>
    Dario

  • How could i use resource bundle in managed bean instead of harding coding?

    component is created in managed bean programmatically, so how to set attributes(e.g. text, value) using resource bundling instead of hard coding, as like coding on the page directlly?
    Thanks for your help!
    Kevin.

    component is created in managed bean programmatically, so how to set attributes(e.g. text, value) using resource bundling instead of hard coding, as like coding on the page directlly?
    Thanks for your help!
    Kevin.

  • How to work with Resource Bundle

    Hi
    I work with JDeveloper 1013 and making an application with ADF Faces and BC.
    I'd like to internationalize my own application. How can I do this with Resource Bundle(java). How to ask which language the browser wants, ...

    There is a chapter in the ADF Developer Guide that explains this.
    Read it and let us know if you still have questions.

  • 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.

  • How to share a resource bundle throughout the faces application

    adf faces 11g release 1
    I want to implement the resource bundle as a java class extending the ListResourceBundle . That works fine for the local project.
    I then made one global "resource project" that should be shared in all projects. I tried first deploying the project to a adflib jar file,
    but i found that the resource class was not included ! I then deployed to a ordinary jar file and that works fine.
    My question is : Is that the way to make a shared resource bundle ?
    Regards,
    Jan

    Hi.
    Check following
    http://andrejusb.blogspot.com/2009/12/reusing-resource-bundles-from-different.html

  • How does UCMhome\weblayout\resources\bundle.js get populated in 11g?

    Hi,
    I am working on a feature in a component of the UCM 11g,which requires an asynchronous service request to the CONTENT SERVER.This is achieved through YUI async call.
    This call is in a function which in turn is included in a common include resource named "custom_common_bundle_functions".
    My problem is that, the changes made in this include aren't reflected in the common script file ( UCMhome\weblayout\resources\bundle.js ) even after a restart of the content server. I had checked with the load order of the all the files which override the above mentioned common include, but it didn't help.
    Is there any other case where this file stops accepting any changes made ?
    Thanks for your time.
    -sandeep

    Use
                 <fx:resources>
                    <fx:fileset dir="${basedir}/${dist.dir}" includes="*.jar"/>
                    <fx:fileset dir="${basedir}/${dist.dir}" includes="lib/*.jar"/>
                </fx:resources>or simply
          <fx:fileset dir="${basedir}/${dist.dir}" includes="**/*.jar"/>Filed http://javafx-jira.kenai.com/browse/RT-24757 to update the docs.
    Edited by: igor on Sep 5, 2012 2:23 PM

  • How to load the resource bundle message on confirmation popup

    hi every one
    i am using java script confirmation message on my delete button.
    this is my sample for that one
    <h:commandButton action="#{createCurrency.removeCurrency}"
             onclick="if (!confirm('Are you sure to delete this value?')) return false" value="#{messages.Delete}"/>    i need to load the "Are you sure to delete this value?" from resource bundle.
    is there any way to load above message from resource bundle.
    thiagu.m

    If you're using JSF 1.2, you can add the bundle config in your faces-config.xml file like this:
    <resource-bundle>
       <base-name>mypackage.i18n.MessageResources</base-name> // i18n is shorthand for internationalization
       <var>msg</var>
    </resource-bundle>     
    <locale-config>           
       <default-locale>en</default-locale>  // or whatever locale you preferred 
       <supported-locale>...</supported-locale> // other locale defined here if you need them
    </locale-config>Then create a property file called "MessageResources_en.properties. In this file, you can define something like:
    {code}
    MSG_CONFIRM=Do you wish to delete this value?
    // add other messages here. Syntax is: key=value
    {code}
    Then reference the bundle's message in your form as per normal:
    {code}
    !confirm(#{msg.MSG_CONFIRM}))
    {code}
    I haven't tried the above codes but it should help you get started.
    Edited by: icepax on 13/11/2009 19:44

  • Unable to resolve resource bundle "myResources" locale "en_US" ?

    Hi All,
                        I have created two locales one is en_US and Second one is fr_FR. I placed these two files in locale file. These files directory structure is
                    ......\src\locale\en_US and .....\src\locale\fr_FR . After  placing these two files in the project i was compile my application and it is showing just like unable to resolve resource bundle "myResources" locale "en_US"...  can any one help me how to configure the resource bundle in my flex application... i dont have exposure to resource bundle earlier. So plese tell me the configurations step by step.. how to configure...
                           My resource property name is myResource.properties .
    Thanks
    Ram

    If you have already followed the correct directory structure. Then please check the following,
    1. change the compiler arguments, to "-locale=en_US,fr_FR -source-path=locale/{locale}"
    you can find the compiler arguments, by right-clicking over the project name on the flex builder, properties-> flex compiler->compiler options.
    2. please check whether both the locale properties files uses the correct encoding. If not change them to "UTF-8"
    you can find this, by right-clicking over the properties file on the flex builder, properties->resources->text file encoding

  • WebCenter Spaces: Customise Resource Bundles?

    Does anyone know if and how the webcenter spaces resource bundles may be customised or overridden?
    I need to rename the "My Group Spaces" tab to a custom name. I see that the label is obtained (within webcenter java code) from a resource bundle "oracle.webcenter.webcenterapp.resource.WebCenterResourceBundle".
    Thanks in advance,
    Bijesh

    Read this white paper: http://www.oracle.com/technetwork/middleware/webcenter/owcs-r11-extend-spaces-wp-132596.pdf
    Page 42: Renaming the personal space tab.
    The paper should also explain how to create your own resource bundle.

  • How to compare and edit Resource bundle file using java programe

    Hi All
    I have two resource bundle with key, value and some comments. I need to write a java code to compare both of the values of the keys and if the values are different then i want to replace the second value with the first value.
    Its a programe which will udpate the second file with the first file values.
    I tried using Properties class but it didnt worked because when i am saving the file using store method it removes all the comments and the order of text also got disturbed.
    How I need to do this any help appriciated.
    Please elt me know if someone needs more info.
    Thanks in advance.

    Let's assume the ini file is a mapping type storage (key=value) so lets use Properties object. (works with java 1.4 & up)
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Properties;
    public class Test {
         private static Properties props;
         public static void main(String[] args) throws IOException {
              File file = new File("test.ini");//This is out ini file
              props = new Properties();//Create the properties object
              read(file);//Read the ini file
              //Once we've populated the Properties object. set/add a property using the setProperty() method.
              props.setProperty("testing", "value");
              write(file);//Write to ini file
         public static void read(File file) throws IOException {
              FileInputStream fis = new FileInputStream(file);//Create a FileInputStream
              props.load(fis);//load the ini to the Properties file
              fis.close();//close
         public static void write(File file) throws IOException {
              FileOutputStream fos = new FileOutputStream(file);//Create a FileOutputStream
              props.store(fos, "");//write the Properties object values to our ini file
              fos.close();//close
    }

Maybe you are looking for

  • Bridge Preview Images not showing changes made in ACR

    Suddenly my raw (Nef) files in Bridge are not reflecting the changes I make to them. In other words after downloading from my CF card, I work on raw files in ACR either one at a time or sometimes applying changes across several pictures. The changed

  • [SOLVED] aterm and auto-scroll-down when typing

    I've been using aterm for a while now, and before that urxvt. What bothers me about aterm that I was very used to in urxvt was that, when you have scrolled up a bit, it doesn't jump to the bottom when you start typing. Is there any way for aterm to b

  • Transfer recorded tv to N95

    Hi, I've been having some problems transcoding recorded tv ( files recorded using media center in .dvr-ms ) to watch my N95, even after reading these discussions and downloading 'Super'. Super works fine for encoding mpegs and avi's etc. but I can't

  • Drill-Through

    Hello All, I got two reports developed in obiee. I wanted to create a drill through from report 1 to report 2. I was serching for option but i couldn't find and i searched one the web also didn't get any usefull help either. can anybody guide me to a

  • Error - when creating a standby database with EM 10g Grid Control

    Hi, I am experiencing some problems when I want to create through the EM 10g Grid Control a standby database from a allready existing db. At step 2 when the files should be generated and copied to the other system, I am always getting the error that