Package com.sun.enterprise.config.serverbeans

Examples of com.sun.enterprise.config.serverbeans.Configs


            }
        }
        return ( exists );
    }
    private static void addConfig(final ConfigContext acc, final Config dc) throws ConfigException {
        final Configs configs = ConfigAPIHelper.getDomainConfigBean(acc).getConfigs();
        dc.setName(SystemPropertyConstants.TEMPLATE_CONFIG_NAME);
        configs.addConfig(dc);
        configureDefaultJmsHost(dc);
        addClientHostNameProperty2SystemJmxConnector(dc);
    }
View Full Code Here


//            checkDuplicate("j2ee-application", applications.getJ2eeApplication(),"name");
//            checkDuplicate("lifecycle-module", applications.getLifecycleModule(),"name");
//            checkDuplicate("web-module", applications.getWebModule(),"name");
           
            // Configs
            Configs configs = domain.getConfigs();
            checkDuplicate("config", configs.getConfig(), "name");
            Config[] config = configs.getConfig();
            for(int i=0;i<config.length;i++) {
               
                HttpService httpservice = config[i].getHttpService();
                //checkDuplicate("acl",httpservice.getAcl(), "name");
                checkDuplicate("http-listener",httpservice.getHttpListener(), "id");
View Full Code Here

    }

    private void initialize() {
        try {
            ConfigContext ctx = AdminService.getAdminService().getAdminContext().getAdminConfigContext();
            Configs configs = ((Domain) ctx.getRootConfigBean()).getConfigs();
            Config[] configArray = configs.getConfig();          
            for (int i = 0; i < configArray.length; i++) {
                SecurityService ss = configArray[i].getSecurityService();
                IdentityAssertionTrust[] iatList = ss.getIdentityAssertionTrust();
                for (int j = 0; j < iatList.length; j++) {
                    IdentityAssertionTrust iat = iatList[j];
View Full Code Here

            }

            //Ensure that a configuration with the standalone configuration name
            //does not already exist.                       
            Domain domain = ConfigAPIHelper.getDomainConfigBean(configContext);           
            Configs configs = domain.getConfigs();
            Config newConfig = configs.getConfigByName(newConfigName);
            if (newConfig != null) {
                throw new ConfigException(_strMgr.getString(
                    "configurationAlreadyExists", newConfigName));
            }

      //"domain" is a restricted name
            if ("domain".equals(newConfigName)) {
                throw new ConfigException(_strMgr.getString(
                    "configurationNameRestricted", newConfigName));
            }

      // Ensure that the name is a valid target meaning that there are no
      // servers and clusters with the same name                    
      Servers servers = domain.getServers();
      Server server = servers.getServerByName(newConfigName);
            if (server != null) {
                throw new ConfigException(_strMgr.getString(
                    "configurationNameAlreadyExistsAsServer", newConfigName));
            }

      Clusters clusters = domain.getClusters();
      Cluster cluster = clusters.getClusterByName(newConfigName);
            if (cluster != null) {
                throw new ConfigException(_strMgr.getString(
                    "configurationNameAlreadyExistsAsCluster", newConfigName));
            }

      NodeAgents nas = domain.getNodeAgents();
      NodeAgent na = nas.getNodeAgentByName(newConfigName);
            if (na != null) {
                throw new ConfigException(_strMgr.getString(
                    "configurationNameAlreadyExistsAsNodeAgent", newConfigName));
            }

            //Clone the source configuration to make the new configuration.       
            newConfig = (Config)sourceConfig.clone();           
            newConfig.setConfigContext(sourceConfig.getConfigContext());
           
            //Add/override properties in the cloned configuration
            addConfigurationProperties(newConfig, props);

            //Copy the configuration directory from the central repository
            EEDomainsManager mgr = new EEDomainsManager();
            mgr.copyConfigururation(new RepositoryConfig(),
                sourceConfigName, newConfigName)
           
            //Set the name of the newly created standalone configuration and add it to the
            //list of configurations
            newConfig.setName(newConfigName);
            configs.addConfig(newConfig, OVERWRITE);
            try {
                ConfigContext ctx = getConfigContext();
                if (ctx.isChanged())
                    ctx.flush();
                new AdminNotificationHelper(AdminService.getAdminService().getAdminContext()).sendNotification();
View Full Code Here

            mgr.deleteConfigururation(new RepositoryConfig(),
                configName)
           
            //Remove the configuration
            Domain domain = ConfigAPIHelper.getDomainConfigBean(configContext);           
            Configs configs = domain.getConfigs();
            configs.removeConfig(config, OVERWRITE);
        } catch (Exception ex) {
            throw getExceptionHandler().handleConfigException(
                ex, "eeadmin.deleteConfiguration.Exception", configName);           
        }
    }       
View Full Code Here

            }
        }
        return ( exists );
    }
    private static void addConfig(final ConfigContext acc, final Config dc, final String dcName) throws ConfigException {
        final Configs configs = ConfigAPIHelper.getDomainConfigBean(acc).getConfigs();
        dc.setName(dcName);
        configs.addConfig(dc);
        configureDefaultJmsHost(dc);
        addClientHostNameProperty2SystemJmxConnector(dc);
    }
View Full Code Here

        }

        try {
            ConfigContext ctx = AdminService.getAdminService().getAdminContext()
                                            .getAdminConfigContext();
            Configs configs = ((Domain) ctx.getRootConfigBean()).getConfigs();

            // Check if the Event is caused by create/delete instance command
            // Also in the case of port conflicts during create instance if it is a system property
            boolean createInstance = false;
            if ( (ev.getChoice().equals("ADD") || ev.getChoice().equals("DELETE"))
                    && (ev.getName().equals("ServerRef") || ev.getName().equals("SystemProperty")) )
                createInstance = true;

            if (configs == null) {
                return;
            }

            Config[] cfgs = configs.getConfig();

            if (cfgs == null) {
                return;
            }
View Full Code Here

        try {
            ConfigContext ctx = AdminService.getAdminService().getAdminContext()
                                           .getAdminConfigContext();
            Domain domain = (Domain) ctx.getRootConfigBean();
            Configs configs = domain.getConfigs();
            AvailabilityService avSvc = null;
            String targetName = null;

            if (configs != null) {
                boolean found = false;
                Config[] configArray = configs.getConfig();
                for (int i = 0; i < configArray.length; i++) {
                    avSvc = configArray[i].getAvailabilityService();
                    if (avSvc != null) {
                        ConvergedLoadBalancer clb = configArray[i].getAvailabilityService()
                                                                  .getConvergedLoadBalancer();
View Full Code Here

    public String[] listConvergedLoadBalancers() throws MBeanException {
        try {
            ConfigContext ctx = AdminService.getAdminService().getAdminContext()
                                            .getAdminConfigContext();
            Domain domain = (Domain) ctx.getRootConfigBean();
            Configs configs = domain.getConfigs();
            HashSet names = new HashSet(0);

            if (configs != null) {
                Config[] configArray = configs.getConfig();
                for (int i = 0; i < configArray.length; i++) {
                    AvailabilityService avSvc = configArray[i].getAvailabilityService();
                    if (avSvc != null) {
                        ConvergedLoadBalancer clb = configArray[i].getAvailabilityService()
                                                                  .getConvergedLoadBalancer();
View Full Code Here

        try {
            // get the clbconfig name if clb name is provided
            _logger.log(Level.FINE, "Checking if CLB Name provided contains valid CLB Config Name");
            if (clbName != null) {
                Domain domain = (Domain) ctx.getRootConfigBean();
                Configs configs = domain.getConfigs();
               
                if (configs != null) {
                    Config[] configArray = configs.getConfig();
                    for (int i = 0; i < configArray.length; i++) {
                        AvailabilityService avSvc = configArray[i].getAvailabilityService();
                        if (avSvc != null) {
                            ConvergedLoadBalancer clb = configArray[i].getAvailabilityService()
                                                                      .getConvergedLoadBalancer();
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.Configs

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.