Package com.sun.messaging.jmq.jmsserver.config

Examples of com.sun.messaging.jmq.jmsserver.config.BrokerConfig


        loadProps(ac);
        return ac;
    }

    private static void loadProps(AccessController ac) throws BrokerException {
        BrokerConfig config = Globals.getConfig();
        String serviceName = ac.getServiceName();

        ac.getAuthProperties().setProperty(PROP_SERVICE_NAME, ac.getServiceName());
        ac.getAuthProperties().setProperty(PROP_SERVICE_TYPE,
                                 ServiceType.getServiceTypeString(ac.getServiceType()));

        //first get system wide properties
        getProps(ac.getAuthProperties(),
                     PROP_AUTHENTICATION_PREFIX, ac.getAuthType(), null, null);
        //get service instance properties - instance override system
        getProps(ac.getAuthProperties(),
                 PROP_AUTHENTICATION_PREFIX, ac.getAuthType(),
                 PROP_AUTHENTICATION_AREA, serviceName);

        String value = config.getProperty(PROP_SERVICE_PREFIX+serviceName+
                                          PROP_ACCESSCONTROL_TYPE_SUFFIX);
        if (value == null || value.trim().equals("")) {
        value = config.getProperty(PROP_ACCESSCONTROL_TYPE);
        }
        if (value == null || value.trim().equals("")) {
           if (ac.isAccessControlEnabled()) {
           throw new BrokerException(Globals.getBrokerResources().getKString(
                            BrokerResources.X_ACCESSCONTROL_TYPE_NOT_DEFINED));
View Full Code Here


        boolean need = false;
        String svcname = null;
        String svctype = null;
        AccessController ac = null;
        BrokerConfig bcfg = Globals.getConfig();
        Logger logger = Globals.getLogger();

        String pp = null, svcpp = null;
        List activesvcs= ServiceManager.getAllActiveServiceNames();
        Iterator itr = activesvcs.iterator();
View Full Code Here

    public BrokerMonitor()  {
  super();
  initProps();

  BrokerConfig cfg = Globals.getConfig();
  cfg.addListener("imq.instancename", this);
  cfg.addListener("imq.portmapper.port", this);
  cfg.addListener("imq.product.version", this);
  cfg.addListener("imq.system.max_count", this);
    }
View Full Code Here

        String pass_phrase = null;
    }

    public static String getKeystoreLocation() throws IOException {
  if (keystore_location == null)  {
      BrokerConfig bcfg;
      bcfg = Globals.getConfig();           

            // Get Keystore Location and  Passphrase here .....
     
            String dir, file, value, pf_dir, pf_file, pf_value, file_sep;
     
            file_sep = System.getProperty("file.separator");
     
            // Get Keystore location by getting the directory and the name
            // of the keystore file.

            if ((value = bcfg.getProperty(KEYSTORE_DIR_PROP)) != null) {
                value = StringUtil.expandVariables(value, bcfg);
                dir = value;
            } else {
                dir = bcfg.getProperty(Globals.IMQ + ".varhome") +
                file_sep + "security";
            }
     
            keystore_location = dir + file_sep
      + bcfg.getProperty(KEYSTORE_FILE_PROP);
 
  }

  return (keystore_location);
    }
View Full Code Here

  return (keystore_location);
    }

    public static String getKeystorePassword() throws IOException {
  if (pass_phrase == null)  {
      BrokerConfig bcfg;
             Password pw = null;

      bcfg = Globals.getConfig();           

            // Get Passphrase from property setting
            pass_phrase = bcfg.getProperty(KEYSTORE_PASSWORD_PROP);
            // if passphrase is null then get it thro' user interaction
            int retry = 0;
            pw = new Password();
            if (pw.echoPassword()) {
                System.err.println(Globals.getBrokerResources().
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.jmsserver.config.BrokerConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.