Topic
  • 10 replies
  • Latest Post - ‏2012-10-05T14:59:09Z by SystemAdmin
KiranYayavaram
KiranYayavaram
45 Posts

Pinned topic Changing Properties file need a restart.. Is there any other way ?

‏2009-09-28T15:59:38Z |
Is there any other way to get the changes from the properties file without restarting server.
Just like refresh registry for struts in admin console, when you modify struts file
Updated on 2012-10-05T14:59:09Z at 2012-10-05T14:59:09Z by SystemAdmin
  • redbaritone
    redbaritone
    152 Posts

    Re: Changing Properties file need a restart.. Is there any other way ?

    ‏2009-09-28T17:10:11Z  
    Assume you mean in WC v6. Yes...but I only give out this hint on a paid engagements, sorry. Maybe IBM will be kind enough to tell you why they broke this behavior. It didn't use to be this way - it is IBM's way of forcing you to use Content Spots IMO.

    R
  • SystemAdmin
    SystemAdmin
    8614 Posts

    Re: Changing Properties file need a restart.. Is there any other way ?

    ‏2009-10-07T15:46:52Z  
    There is a dynamic text properties file that can be refreshed as you mention.

    http://publib.boulder.ibm.com/infocenter/wchelp/v6r0m0/topic/com.ibm.commerce.developer.tutorial.doc/tutorial/ttdsfctext.htm
  • SystemAdmin
    SystemAdmin
    8614 Posts

    Re: Changing Properties file need a restart.. Is there any other way ?

    ‏2009-10-08T09:38:13Z  
    Do note, that if you're using WCS 5.6 the Change Pages function (which is used to modify the dynamic properties files) seems to be somewhat broken. It limit's the size of the file to 4096 characters. Some of the change pages functions are fixed in WCS 5.6 fp7, but not all.
  • HariHaran
    HariHaran
    34 Posts

    Re: Changing Properties file need a restart.. Is there any other way ?

    ‏2009-10-12T14:39:39Z  
    Did you try by setting following property as true in WCS configuration file.

    developmentMode = "true" , by default this value is false.
  • KiranYayavaram
    KiranYayavaram
    45 Posts

    Re: Changing Properties file need a restart.. Is there any other way ?

    ‏2009-10-12T14:44:07Z  
    • HariHaran
    • ‏2009-10-12T14:39:39Z
    Did you try by setting following property as true in WCS configuration file.

    developmentMode = "true" , by default this value is false.
    Can you explain how that change works?
  • SystemAdmin
    SystemAdmin
    8614 Posts

    Re: Changing Properties file need a restart.. Is there any other way ?

    ‏2009-10-12T18:39:07Z  
    One way is to store the details in a table in the database.
  • SChandu
    SChandu
    19 Posts

    Re: Changing Properties file need a restart.. Is there any other way ?

    ‏2009-12-10T19:31:57Z  
    One way is to store the details in a table in the database.
    It is not suggestable to set the developmentMode = "true" in production. It may create lot of performance issues.
    Use the refersh registry concept by extending Registry interface CustomConstantsRegistry implements Registry and in the getInstance method call you registry ..
    if (customConstantsRegistry == null)
    customConstantsRegistry = (CustomConstantsRegistry ) RegistryManager
    .singleton().getRegistry("CustomConstantsRegistry ");
    if (customConstantsRegistry == null) {
    customConstantsRegistry = new CustomConstantsRegistry ();
    RegistryManager.singleton()
    .addRegistry("CustomConstantsRegistry ",
    customConstantsRegistry);
    }
    And in the refresh() method read your properties (CustomRegistry.properties)..
    Add the register your new registry in the wc-server.xml file.
  • SChandu
    SChandu
    19 Posts

    Re: Changing Properties file need a restart.. Is there any other way ?

    ‏2009-12-10T19:33:53Z  
    • SChandu
    • ‏2009-12-10T19:31:57Z
    It is not suggestable to set the developmentMode = "true" in production. It may create lot of performance issues.
    Use the refersh registry concept by extending Registry interface CustomConstantsRegistry implements Registry and in the getInstance method call you registry ..
    if (customConstantsRegistry == null)
    customConstantsRegistry = (CustomConstantsRegistry ) RegistryManager
    .singleton().getRegistry("CustomConstantsRegistry ");
    if (customConstantsRegistry == null) {
    customConstantsRegistry = new CustomConstantsRegistry ();
    RegistryManager.singleton()
    .addRegistry("CustomConstantsRegistry ",
    customConstantsRegistry);
    }
    And in the refresh() method read your properties (CustomRegistry.properties)..
    Add the register your new registry in the wc-server.xml file.
    Forgot to mention.. after adding entry in the wc-server.xml file. you should be able to see the CustomConstantsRegistry in the WCS Admin Console.
    Whenever there is change you can refresh this perticular registry.
  • shivals
    shivals
    1 Post

    Re: Changing Properties file need a restart.. Is there any other way ?

    ‏2012-10-03T09:18:11Z  
    • SChandu
    • ‏2009-12-10T19:31:57Z
    It is not suggestable to set the developmentMode = "true" in production. It may create lot of performance issues.
    Use the refersh registry concept by extending Registry interface CustomConstantsRegistry implements Registry and in the getInstance method call you registry ..
    if (customConstantsRegistry == null)
    customConstantsRegistry = (CustomConstantsRegistry ) RegistryManager
    .singleton().getRegistry("CustomConstantsRegistry ");
    if (customConstantsRegistry == null) {
    customConstantsRegistry = new CustomConstantsRegistry ();
    RegistryManager.singleton()
    .addRegistry("CustomConstantsRegistry ",
    customConstantsRegistry);
    }
    And in the refresh() method read your properties (CustomRegistry.properties)..
    Add the register your new registry in the wc-server.xml file.
    Hi sChandu,

    I need to create a new registry for reading my property file.I have created one java file which extends Registry interface and entry has been made in wc-server.xml.

    Could you please explain,what should i code in refresh() method of my new registry.Just reading the property file works?? after reading should i store it in any value?Could you please explain this.
    Thanks,
    Sindhu
  • SystemAdmin
    SystemAdmin
    8614 Posts

    Re: Changing Properties file need a restart.. Is there any other way ?

    ‏2012-10-05T14:59:09Z  
    • shivals
    • ‏2012-10-03T09:18:11Z
    Hi sChandu,

    I need to create a new registry for reading my property file.I have created one java file which extends Registry interface and entry has been made in wc-server.xml.

    Could you please explain,what should i code in refresh() method of my new registry.Just reading the property file works?? after reading should i store it in any value?Could you please explain this.
    Thanks,
    Sindhu
    have a look at following links. it should explain you detailed information on how to use registry framework in WebSphere Commerce.

    http://www.ibm.com/developerworks/websphere/tutorials/0901_verma/index.html