Reloading variables class


General J2EE: Reloading variables class

  1. Reloading variables class (1 messages)

    Hi , i'm trying to find the best solution to a class that holds many variables that are used all trough my program and how can i force reload on all of them everywhere in the program . for example i have a class that holds the background color i want to use in jfreechart and it's held in but used troughout the web project by many other classes i'm using spring+hibernate and the data is kept in the DB , my aim is to change those type of things from the backend DB and to change in one strike can i do that without reloading the server ? (Each class loads SystemVariables trough spring bean get&set)
  2. Re: Reloading variables class[ Go to top ]

    you can easily expose your SystemVariables bean as JMX MBean using Spring JMX support and then connect to your running JVM using JConsole and update properties of your bean directly in memory. if some of the dependent beans or services happen to cache values of SystemVariables' properties there is notification system in JMX also supported by Spring.