Package com.sun.enterprise.config

Examples of com.sun.enterprise.config.ConfigContext


        if (event.getModuleType().equals(ModuleDeployEvent.TYPE_WEBMODULE)) {
            if (_logger.isLoggable(Level.FINEST)) {
                _logger.log(Level.FINEST,
                    "[WebModuleDeployEventListener] Handling event " + event.toString());
            }
            ConfigContext config = event.getOldConfigContext();
            String moduleName = event.getModuleName();

            // refreshes the config context with the context from this event
            try {
                getWebModulesManager().refreshConfigContext(config);
View Full Code Here


                    "[WebModuleDeployEventListener] Handling event " + event.toString());
            }
            String moduleName = event.getModuleName();
               
            // unload from old location
            ConfigContext oldConfig = event.getOldConfigContext();
            moduleUndeployed(oldConfig, moduleName);
              
            // load to new location
            ConfigContext config = event.getConfigContext();
            moduleDeployed(config, moduleName);
        }
       
    }
View Full Code Here

        if (event.getModuleType().equals(ModuleDeployEvent.TYPE_WEBMODULE)) {
            if (_logger.isLoggable(Level.FINEST)) {
                _logger.log(Level.FINEST,
                    "[WebModuleDeployEventListener] Handling event " + event.toString());
            }
            ConfigContext config = event.getConfigContext();
            String moduleName = event.getModuleName();

            WebModule webModule = getWebModuleAndUpdateCache(
                config, moduleName, true);
View Full Code Here

        if (event.getModuleType().equals(ModuleDeployEvent.TYPE_WEBMODULE)) {
            if (_logger.isLoggable(Level.FINEST)) {
                _logger.log(Level.FINEST,
                    "[WebModuleDeployEventListener] Handling event " + event.toString());
            }
            ConfigContext config = event.getConfigContext();
            String moduleName = event.getModuleName();

            WebModule webModule = getWebModuleAndUpdateCache(
                config, moduleName, true);
View Full Code Here

     * @return virtual servers as a string (separated by space or comma)
     */
    private String getVirtualServers(String appName) {
        String ret = null;
        try {
            ConfigContext ctx =
                ApplicationServer.getServerContext().getConfigContext();
            ret = ServerBeansFactory
                    .getVirtualServersByAppName(ctx, appName);
        } catch (ConfigException ce) {
            _logger.log(Level.FINE, "Cannot get virtual server for " + appName, ce);
View Full Code Here

  return result;
    }

    public static Cluster getCluster()
    {
  ConfigContext configCtx = null;
  String instanceName = null;
  Cluster result = null;
  try {
            if(_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE, ".getCluster->:");
      }
      ServerContext serverContext = ApplicationServer.getServerContext();
      if (serverContext == null) {
    if(_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE, ".getCluster: No ServerContext");
    }
    return null;
      }
      configCtx = serverContext.getConfigContext();
      instanceName = serverContext.getInstanceName();
      result =
          ClusterHelper.getClusterForInstance(configCtx, instanceName);
  } catch (ConfigException e) {
            if(_logger.isLoggable(Level.FINE)) {
    _logger.log(Level.FINE,
          ".getCluster: ConfigContext: " + configCtx.toString()
          + " ; instanceName: " + instanceName
          + " ; exception: " + e);
      }
  } finally {
            if(_logger.isLoggable(Level.FINE)) {
View Full Code Here

  context.setInstallRoot(rootDir);
  context.setInstanceName(SERVER_INSTANCE);
        try{
            String serverXml = context.getServerConfigURL();
      // Read server.xml and create a read-only configuration context
            ConfigContext cfgContext =
    ConfigFactory.createConfigContext(serverXml,
                                                  true,
                                                  false,
                                                  true);
      context.setConfigContext(cfgContext);
View Full Code Here

        deployService = dFactory.createDeploymentService(configContext);
        return deployService;
    }

    public static DeploymentService getDeploymentService() {
        ConfigContext configContext =
            DeploymentServiceUtils.getConfigContext();
        return DeploymentService.getDeploymentService(configContext);
    }
View Full Code Here

        Server serverBean = null;
        /*
        ServerContext serverCtx = ApplicationServer.getServerContext();
        ConfigContext configCtx = serverCtx.getConfigContext();
         */
        ConfigContext configCtx = this.getConfigContext();
        try {
            serverBean = ServerBeansFactory.getServerBean(configCtx);
        } catch (ConfigException ex) {}

        return serverBean;
View Full Code Here

    * determine if this instance is the DAS
    */   
    public boolean isDAS() {
        boolean result = true;
        Server serverBean = this.getServerBean();
        ConfigContext configCtx = this.getConfigContext();
        if(serverBean != null && configCtx != null) {
            try {
                result = ServerHelper.isDAS(configCtx, serverBean);
            } catch (ConfigException ex) {}
        }
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.