0 Replies Latest reply on Mar 16, 2004 5:15 AM by mrtom

    J2EE run-time variables

    mrtom

      I'm having difficulty figuring out the neatest way to keep run-time variables accessible within a J2EE environment.

      My main aim is for a set of MBeans that are able to read shared variables in order to prevent the repeating of configuration options in each of my *-service.xml files. My thought is to have an MBean which will manage the variables, but I don't know whether to just use a singleton to store them or whether I can use JBossNS or other J2EE features.

      Other thoughts I was having was....
      - Cluster wide variables so only _one_ configuration file in the cluster needed changing. (could use either HASingletonController or just use farm/ to distribute variables locally to each node)
      - Local VM settings. I wish some settings to be local to the VM, eg. to store a unique Node ID. I'll probably create a separate mbean for 'local' variables unless I've missed something simpler.

      Sorry if this sounds simple, I'm still very new to J2EE and have never found much documentation on this.
      Tom.