Package com.sun.enterprise.config

Examples of com.sun.enterprise.config.ConfigContext


        if (_instance != null)
            return _instance;
        else {
            _instance = new GMSFailEvent(proxy);
            String currentServer = ApplicationServer.getServerContext().getInstanceName();
            ConfigContext context  =  AdminService.getAdminService().getAdminContext().getAdminConfigContext();
            if(AdminService.getAdminService().isDas()) {
                try {
                    Cluster[] clusters = (Cluster[]) ClusterHelper.getClustersInDomain(context);
                    for (int i = 0; i < clusters.length; i++) {
                        String clusterName = clusters[i].getName();
View Full Code Here


        if (_instance != null)
            return _instance;
        else {
            _instance = new GMSStopEvent(proxy);
            String currentServer = ApplicationServer.getServerContext().getInstanceName();
            ConfigContext context  =  AdminService.getAdminService().getAdminContext().getAdminConfigContext();
            if(AdminService.getAdminService().isDas()) {
                try {
                    Cluster[] clusters = (Cluster[]) ClusterHelper.getClustersInDomain(context);
                    for (int i = 0; i < clusters.length; i++) {
                        String clusterName = clusters[i].getName();
View Full Code Here

    private static Map getOtherConfigMap() throws ConfigException {
        Map token2ConfigMap = new LinkedHashMap();
        ServerContext serverContext = ApplicationServer.getServerContext();
        ElementProperty[] elementProps = null;
        if (serverContext != null) {
            ConfigContext configContext = serverContext.getConfigContext();
            if (configContext != null) {
                SecurityService securityService =
                    ServerBeansFactory.getSecurityServiceBean(configContext);
                if (securityService != null) {
                    elementProps = securityService.getElementProperty();
                }
            }
        } else {
            String domainXMLLocation = System.getProperty(
                    SystemPropertyConstants.INSTANCE_ROOT_PROPERTY) +
                    IAdminConstants.NODEAGENT_DOMAIN_XML_LOCATION;
            ConfigContext configContext =
                ConfigFactory.createConfigContext(domainXMLLocation);
            if (configContext != null) {
                Domain domain = ServerBeansFactory.getDomainBean(configContext);
                if (domain != null) {
                    NodeAgents nodeAgents = domain.getNodeAgents();
View Full Code Here

        boolean isHealthy = true;
       
        String address = listener.getAddress();
        JMXConnectorConfig jmxCfg = null;
        String urlString = null;
        ConfigContext configCtx = InstanceHangAction.configCtx;
       
        try {
            if (address.equals(ANY_ADDR)) {
                jmxCfg = ServerHelper.getJMXConnectorInfo(configCtx,server.getName());
                address = jmxCfg.getHost();
View Full Code Here

     * @param clusterName
     * @throws ConfigException
     */
    private void initialize(String clusterName) throws ConfigException {

        ConfigContext configContext = com.sun.enterprise.admin.server.core.AdminService.getAdminService().getAdminContext().getAdminConfigContext();

        Domain domain = ServerBeansFactory.getDomainBean(configContext);

        Clusters clusters = domain.getClusters();
        Cluster cluster = clusters.getClusterByName(clusterName);
View Full Code Here

   
    private void populateNodeAgentToInstances() {
        List<String> instances = config.getTarget().getInstances();
        if(instances != null) {
            Iterator<String> iterator = instances.iterator();
            ConfigContext configContext = AdminService.getAdminService().getAdminContext().getAdminConfigContext();
            while(iterator.hasNext()) {
                try {
                    String instanceName = iterator.next();
                    if(!(instanceName.equals(Constants.SERVER))) {
                        Server server = ServerHelper.getServerByName(configContext,
View Full Code Here

            if(keys.size()==0){
                throw new DiagnosticException("Cannot collect diagnostic information for cluster [ "+target.getName()+" ] without any instance");
            }
            try
            {
            ConfigContext configContext = com.sun.enterprise.admin.server.core.AdminService.getAdminService().getAdminContext().getAdminConfigContext();
            Domain domain = ServerBeansFactory.getDomainBean(configContext);
            Clusters clusters = domain.getClusters();

            Cluster targetCluster = clusters.getClusterByName(target.getName());

            boolean    captureHadbInfoEnabled = isHadbCaptureEnabled(configContext,targetCluster.getName());

                addHadbInfoCollector(captureHadbInfoEnabled, target.getName(), reportDir);
            }
            catch(ConfigException ce){
                logger.log(Level.WARNING,
                        "Config Exception" ,ce);
            }
            catch(DiagnosticException de){
                logger.log(Level.WARNING,
                        "Diagnostic Exception" ,de);
            }
        }

        if(target.getType().equals(EETargetType.DOMAIN)){
        try{
        ConfigContext configContext = com.sun.enterprise.admin.server.core.AdminService.getAdminService().getAdminContext().getAdminConfigContext();
        Domain domain = ServerBeansFactory.getDomainBean(configContext);
        Clusters clusters = domain.getClusters();
          Cluster clusterArray[] = clusters.getCluster();
            boolean captureHadbInfoEnabled=false;
View Full Code Here

        return smrt;
    }
   
    private ApplicationLoadEventListener __handleEvent(ApplicationEvent event) {
        String appName = event.getApplication().getRegistrationName();
        ConfigContext ctx = event.getConfigContext();
        if (ctx == null) {
            ctx = ApplicationServer.getServerContext().getConfigContext();
        }
        Applications apps = null;
        try {
View Full Code Here

    protected void determineTargetType(String targetName, String taretDir)
    throws DiagnosticException {
        logger.log(Level.FINEST, "diagnostic-service.target_type", type);
        if(type == null) {
                /** Remote mode **/
            ConfigContext configContext = com.sun.enterprise.admin.server.core.
                    AdminService.getAdminService().getAdminContext().
                    getAdminConfigContext();

            try {
                //Determine if it is a instance, a cluster, a node agent or a domain
View Full Code Here

    protected void determineInstances() {
        //Only in case of DAS context, need to determine instances
        // in NodeAgent context, it's already determined.
        if(context.equals(EEExecutionContext.DAS_EC)) {
            Server[] servers = null;
            ConfigContext configContext = com.sun.enterprise.admin.server.core.
                    AdminService.getAdminService().getAdminContext().
                    getAdminConfigContext();
            if(type.equals(EETargetType.CLUSTER)) {
                try {
                    servers = ServerHelper.getServersInCluster(configContext, target);
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.