Design changes

Discussions

EJB programming & troubleshooting: Design changes

  1. Design changes (1 messages)

    Hi ,
    I have a problem in my design blow is the picture of my design.
    I have a interface
    class Interface Inter {
    public static final RessourceBundle rs = RessourceBundle.getResource("XY.PROPERTIES");

    public static final int log = rs.getLog("SHOWERROR");
    }
    Si I will be refering the above log in all my code ,Since the object is static and finall and once loaded it doesn't load agian ,So If I change in the properties file I don't get the modifed value ..
    SinceI am accessing in my all code as Inter.log is true print error trace like the above I have defined lot ...

    SO I would like to get the modifed value ,So I need any one can help I needn't modify all the code where I refer the above constants ,So if any one can help me to modify only the Interface so that I can get the modified value....

    Thanks...

    Threaded Messages (1)

  2. Design changes[ Go to top ]

    Hi,
       First let be clear here -->

    1.> You have defined static final variables in interface and must be implementing the interface in rest of your code (ejb or helper classes) & now you wanna change variables ? - Well by default interface variables are static & final so you can't do anything and you have to remove implements interfaceXXX from ejb or helper classes.

    2.> In case you have not implemented interface its import'ed - then drop interface and replace it by singleton class with variables declared as static (not final).

    Hope its solves your problem!
    Sumev