Package com.sun.enterprise.config.serverbeans

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


    * Get the session properties bean from server.xml
    * return null if not defined or other problem
    * 7.0 xpath was "/server/web-container/session-config/session-properties";
    */     
    public SessionProperties getInstanceSessionProperties() {
        Config configBean = this.getConfigBean();
        if(configBean == null) {
            return null;
        }
       
        com.sun.enterprise.config.serverbeans.WebContainer webContainerBean
            = configBean.getWebContainer();
        if(webContainerBean == null) {
            return null;
        }
       
        SessionConfig sessionConfigBean = webContainerBean.getSessionConfig();
View Full Code Here


            ConfigContext configContext =
                    AdminService.getAdminService().getAdminContext().getAdminConfigContext();
            Server server = ServerHelper.getServerByName(configContext, instanceName);
            configName = server.getConfigRef();
            Config config = ConfigAPIHelper.getConfigByName(configContext,
                    configName);
      if(attribute.equals(ServerTags.FILE)) {
    LogService logService = config.getLogService();
                return determineLogFile(logService.getFile());
      }
      else {
    DiagnosticService diagService = config.getDiagnosticService();
    return diagService.getAttributeValue(attribute);
      }
  } catch(ConfigException ce) {
      logger.log(Level.SEVERE,
        "diagnostic-service.error_retrieving_logFileName",
View Full Code Here

           txnMgr = Switch.getSwitch().getTransactionManager();
           ServerContext sCtx = ApplicationServer.getServerContext();
           if (sCtx != null) {
               try {
                   ConfigContext ctx = sCtx.getConfigContext();
                   Config cfg = ServerBeansFactory.getConfigBean(ctx);
                   String lvl = cfg.getMonitoringService().getModuleMonitoringLevels().getTransactionService();
                   MonitoringLevel l = MonitoringLevel.instance(lvl);
                   if (l != MonitoringLevel.OFF) {
                       startMonitoring();
                   }
                   MonitoringRegistry registry = sCtx.getMonitoringRegistry();
View Full Code Here

        }
        ConfigContext cc = AdminService.getAdminService().getAdminContext().getAdminConfigContext();
        if(cc==null) {
            return(getWebServerInfoForDAS(request));
        }
        Config config = ServerHelper.getConfigForServer(cc, serverTarget);
        JMXConnectorConfig info = ServerHelper.getJMXConnectorInfo(cc, serverTarget);
        if((config==null) || (info==null) ) {
            return(getWebServerInfoForDAS(request));
        }
        String host = info.getHost();
View Full Code Here

   
        // let's get our admin context
        ConfigContext cc = ApplicationServer.getServerContext().getConfigContext();
        Server server = ServerBeansFactory.getServerBean(cc);
        Config config = ServerBeansFactory.getConfigBean(cc);
        ApplicationRef ref = server.getApplicationRefByRef(moduleID);
        return(getWebServerInfo(cc, config, ref.getVirtualServers(), null, null));
    }
View Full Code Here

    public static void checkWebModuleReferences(String webModuleName)
    throws IASDeploymentException {
        ArrayList virtualServerIds = new ArrayList();

        try {
            Config config  = (Config) ConfigBeansFactory.getConfigBeanByXPath(
                getConfigContext(), ServerXPathHelper.XPATH_CONFIG);
            HttpService httpService = config.getHttpService();
            VirtualServer[] virtualServers = httpService.getVirtualServer();
            for (int j = 0; j < virtualServers.length; j++) {
                VirtualServer aServer   = virtualServers[j];
                String defWebModule     = aServer.getDefaultWebModule();
                if ((defWebModule != null) &&
View Full Code Here

     *@param configContext the ConfigContext to use in finding the HTTP listener of interest
     *@param securityEnabled whether the listener should be secure or open
     *@return HostAndPort for the first non-admin listener matching the security setting
     */
    private static HostAndPort buildHostAndPortFromConfig(ConfigContext configContext, boolean securityEnabled) throws ConfigException {
        Config config = ServerBeansFactory.getConfigBean(configContext);
        HttpService httpService = config.getHttpService();
        HttpListener [] listeners = httpService.getHttpListener();

        return findNonadminListener(configContext, listeners, securityEnabled);
    }
View Full Code Here

    {
        String serverName = null;
        int port = 0;
        try {
            Domain domain = ConfigAPIHelper.getDomainConfigBean(getConfigContext());
            Config config = domain.getConfigs().getConfig(0);
            HttpService httpService = config.getHttpService();
            HttpListener[] httpListener = httpService.getHttpListener();
            VirtualServer[] virtualServer = httpService.getVirtualServer();
           
            // iterate for each of the config virtual server
View Full Code Here

    // This can happen before ApplicationServer.onInitialization()
    // has been called.
    return false;
      }

            Config cfg =
                ServerBeansFactory.getConfigBean(sc.getConfigContext());
            return cfg.getLogService().isLogToConsole();

        } catch ( Exception ex ) {
            new ErrorManager().error(
                "Error while geting echo-log-messages-to-stderr attribute of " +
                " log-service ", ex, ErrorManager.GENERIC_FAILURE );
View Full Code Here

            }
        }
       
        Level logLevel = null;
        try {
            Config cfg =
                ServerBeansFactory.getConfigBean(sc.getConfigContext());
            ModuleLogLevels allModulesLogLevels =
                cfg.getLogService().getModuleLogLevels( );
            // _REVISIT_: Right now ModuleLogLevels element in Log-Service
            // is optional. If the user doesn't specify any module log levels
            // then we will use 'INFO' as the default. For 8.1 this should
            // be a required element.
            if( allModulesLogLevels == null ) { return Level.INFO; }
            if( allModulesLogLevels.getRoot( ).equals( "OFF" ) ) {
                return Level.OFF;
            }

            // _REVISIT_: This is a bad way of searching for a loggername match
            // clean this up after Technology Preview
            ElementProperty[] elementProperties =
                cfg.getLogService().getModuleLogLevels().getElementProperty( );

            if( elementProperties != null ) {
                for( int i = 0; i < elementProperties.length; i++ ) {
                    if( elementProperties[i].getName().equals(loggerName) ) {
                        return Level.parse( elementProperties[i].getValue());
View Full Code Here

TOP

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

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.