Package com.sun.enterprise.config

Examples of com.sun.enterprise.config.ConfigContext


    * Get the cluster name from domain.xml for this server.
    * return null if not found
    */
    public String getClusterName() {
        String result = null;
        ConfigContext configCtx = this.getConfigContext();
       
        String serverName = this.getServerName();
        if(serverName == null) {
            return result;
        }
View Full Code Here


        return result;
    }
   
    public ArrayList getServerNamesInCluster() {
        ArrayList result = new ArrayList();
        ConfigContext configCtx = this.getConfigContext();       
        String serverName = this.getServerName();
        //this should not happen
        if(serverName == null) {
            return result;
        }
View Full Code Here

    /**
     * Get the cluster if the server is in a cluster
     * return null if not
     */   
    public Cluster getCluster() {
        ConfigContext configCtx = this.getConfigContext();
        String serverName = this.getServerName();
        boolean isClustered = false;
        try {
            isClustered = ServerHelper.isServerClustered(configCtx, serverName);
        } catch (ConfigException ex) {}
View Full Code Here

    * return null if not found
    */   
    private Resources getResourcesBean() {
        Resources resourcesBean = null;
        Domain domainBean = null;
        ConfigContext configCtx = this.getConfigContext();
        try {
            domainBean = ServerBeansFactory.getDomainBean(configCtx);
            if(domainBean != null) {
                resourcesBean = domainBean.getResources();
            }
View Full Code Here

    * return null if not found
    */    
    private Applications getApplicationsBean() {
        Applications applicationsBean = null;
        Domain domainBean = null;
        ConfigContext configCtx = this.getConfigContext();
        try {
            domainBean = ServerBeansFactory.getDomainBean(configCtx);
            if(domainBean != null) {
                applicationsBean = domainBean.getApplications();
            }
View Full Code Here

    * return null if not found
    */    
    private Applications getApplicationsBeanDynamic() {
        Applications applicationsBean = null;
        Domain domainBean = null;
        ConfigContext configCtx = this.getConfigContextDynamic();
        try {
            domainBean = ServerBeansFactory.getDomainBean(configCtx);
            if(domainBean != null) {
                applicationsBean = domainBean.getApplications();
            }
View Full Code Here

    * Get the config element from domain.xml.
    * return null if not found
    */    
    private Config getConfigBean() {
        Config configBean = null;
        ConfigContext configCtx = this.getConfigContext();
        try {
            configBean = ServerBeansFactory.getConfigBean(configCtx);
        } catch (ConfigException ex) {}

        return configBean;
View Full Code Here

    * Get the config element from domain.xml.
    * return null if not found
    */    
    private Config getConfigBeanDynamic() {
        Config configBean = null;
        ConfigContext configCtx = this.getConfigContextDynamic();
        try {
            configBean = ServerBeansFactory.getConfigBean(configCtx);
        } catch (ConfigException ex) {}

        return configBean;
View Full Code Here

      ServerContext serverCtx = ApplicationServer.getServerContext();
      //this condition occurs during some unit tests
      if(serverCtx == null)
          return defaultValue;
      ConfigContext configCtx = serverCtx.getConfigContext();   
      ConfigBean configBean = null;
      String returnValueString = null;

      String returnValue = defaultValue;
      try {
          configBean =
              configCtx.exactLookup(xpath);
      } catch (ConfigException ex) {
      }     
      if(configBean != null) {
          returnValueString = configBean.getAttributeValue("value");
      }
View Full Code Here

        if(_logger.isLoggable(Level.FINEST)) {
            _logger.finest("in getServerConfigValue:xpath=" + xpath
                + " defaultValue= " + defaultValue);
        }

        ConfigContext configCtx = this.getConfigContext();
        ConfigBean configBean = null;
        String returnValueString = null;

        int returnValue = defaultValue;
        try {
            configBean =
                configCtx.exactLookup(xpath);
        } catch (ConfigException ex) {
        }     
        if(configBean != null) {
            returnValueString = configBean.getAttributeValue("value");
        }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.ConfigContext

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.