#11 Request JmsServer(Configuration) constructor

closed
Tim Anderson
5
2004-05-06
2003-12-25
Nathan Meyers
No

This is a request to improve embeddability. I'd like to launch the server
with a Configuration object built by means other than reading
openjms.xml. This could be easily solved with an additional JmsServer
constructor and ConfigurationManager.setConfig() capable of taking
Configuration objects:

JmsServer.java:

public JmsServer(Configuration config) {
version();
// initialise the configuration manager
ConfigurationManager.setConfig(config);
_config = config;
}

ConfigurationManager.java:

public static synchronized void setConfig(Configuration config) {
_config = config;
}

Discussion

  • Tim Anderson
    Tim Anderson
    2004-01-03

    Logged In: YES
    user_id=557161

    Checked into CVS. Changes will be available in the final 0.7.6
    release.

     
  • Tim Anderson
    Tim Anderson
    2004-01-03

    • milestone: 210302 -->
    • labels: 440685 -->
    • status: open --> closed-fixed
     
  • J Aaron Farr
    J Aaron Farr
    2004-05-06

    Logged In: YES
    user_id=366739

    There's a bug in the constructor. The constructor is:

    public JmsServer(Configuration config) throws
    ServerException {
    version();
    ConfigurationManager.setConfig(config);
    }

    bug should be:

    public JmsServer(Configuration config) throws
    ServerException {
    version();
    ConfigurationManager.setConfig(config);
    _config = config;
    }

    Otherwise the inti(); method throws a null pointer exception
    since the _config variable is never initialized.

     
  • Tim Anderson
    Tim Anderson
    2004-05-06

    Logged In: YES
    user_id=557161

    Doh. Fixed in CVS. Fix will be available in the 0.7.6.1 release.

     
  • Tim Anderson
    Tim Anderson
    2004-05-06

    • labels: --> enhancement
    • assigned_to: nobody --> tanderson
    • status: closed-fixed --> closed