Package com.sun.enterprise.config.serverbeans

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


        Result result = super.validate(cce); // Before doing custom validation do basic validation
        String choice = cce.getChoice();
        try {
            if (choice.equals(StaticTest.ADD) || choice.equals(StaticTest.VALIDATE)) {
                final IdentityAssertionTrust iat = (IdentityAssertionTrust) cce.getObject();
                Config c = (Config) ((SecurityService) cce.getClassObject()).parent();
                boolean isDefault = iat.isIsDefault();
                if (isDefault) {
                    String trustId = checkIsDefault(c);
                    if (flag && (trustId != null)) {
                        result.failed(_strMgr.getString("DefaultTrustConfigExists", trustId));
                    }
                }
            }
            if (choice.equals(StaticTest.UPDATE)) {
                if (ConfigBean.toBoolean((String) cce.getObject())) {
                    final IdentityAssertionTrust iat = (IdentityAssertionTrust) cce.getClassObject();
                    final Config c = (Config) ((SecurityService) iat.parent()).parent();
                    String trustId = checkIsDefault(c);
                    if (flag) {
                        result.failed(_strMgr.getString("DefaultTrustConfigExists", trustId));
                    }
                }
View Full Code Here


        Result result = super.validate(cce); // Before doing custom validation do basic validation
        String choice = cce.getChoice();
        try {
            if (choice.equals(StaticTest.ADD) || choice.equals(StaticTest.VALIDATE)) {
                final SipListener sl = (SipListener) cce.getObject();
                Config c = (Config) ((SipService) cce.getClassObject()).parent();
                String addr = sl.getExternalSipAddress();
                String port = sl.getExternalSipPort();
                if (sl.getType().equals("internal")) {
                    if (addr != null || port != null) {
                        result.failed(_strMgr.getString("ExternalIsFalse"));
                    }
                }
            }
           if (choice.equals(StaticTest.UPDATE)) {
              if(ServerTags.EXTERNAL_SIP_ADDRESS.equals(cce.getName()) || ServerTags.EXTERNAL_SIP_PORT.equals(cce.getName())) {
                    final SipListener sl = (SipListener) cce.getClassObject();
                    final Config c = (Config) ((SipService) sl.parent()).parent();
                    if (sl.getType().equals("internal")) {
                            result.failed(_strMgr.getString("ExternalIsFalse"));
                    }
              } 
           }
View Full Code Here

            com.sun.enterprise.util.io.FileUtils.makeFriendlyFilename(archiveuri);
        String ejbname = ejbDescriptor.getName();

        IASEjbExtraDescriptors iased = null;
        //Server svr = null;
        Config cfg = null;
        EjbContainer ejbContainerDesc = null;

        try {
            // instantiate container class
            if (ejbDescriptor instanceof EjbSessionDescriptor) {
                EjbSessionDescriptor sd = (EjbSessionDescriptor)ejbDescriptor;
                if ( sd.isStateless() ) {
                    container = new StatelessSessionContainer(ejbDescriptor, loader);
                } else {
                    //container = new StatefulSessionContainer(ejbDescriptor, loader);
        BaseContainerBuilder builder =
      new StatefulContainerBuilder();
        builder.buildContainer(ejbDescriptor, loader,
      dynamicConfigContext);
        container = builder.getContainer();
        //containers.put(ejbDescriptor.getUniqueId(), container);
        //builder.completeInitialization(sm);
                }
            } else if ( ejbDescriptor instanceof EjbMessageBeanDescriptor ) {
                container = new MessageBeanContainer(ejbDescriptor, loader);
    // Message-driven beans don't have a home or remote interface.
                hasHome = false;
            } else {
                if (((EjbEntityDescriptor)ejbDescriptor).getIASEjbExtraDescriptors()
                    .isIsReadOnlyBean()) {

                    EjbEntityDescriptor robDesc = (EjbEntityDescriptor) ejbDescriptor;                   
                    container = new ReadOnlyBeanContainer (ejbDescriptor, loader);
                } else
                    if ((ejbDescriptor.getLocalHomeClassName() != null) &&
                        (ejbDescriptor.getLocalHomeClassName()
                         .equals("com.sun.ejb.containers.TimerLocalHome"))) {
                        container = new TimerBeanContainer(ejbDescriptor, loader);
                    } else {
                        iased = ((EjbEntityDescriptor)ejbDescriptor).
                            getIASEjbExtraDescriptors();
                        if (iased != null) {
                            commitOption = iased.getCommitOption();     
                        }
                        if (commitOption == null) {
                            try {
                                ServerContext sc =
                                    ApplicationServer.getServerContext();

                                cfg = ServerBeansFactory.getConfigBean
                                    (sc.getConfigContext());
                            catch (ConfigException ex) {
                                _logger.log(Level.WARNING,
                                            "ejb.createContainer_exception", ex);
                            }

                            ejbContainerDesc = cfg.getEjbContainer();
                            commitOption = ejbContainerDesc.getCommitOption()
                        }
                        if (commitOption.equals("A")) {
                            _logger.log(Level.WARNING,
View Full Code Here

    }

    private final synchronized MonitoringLevel getCurrentMonitoringLevel() {
  MonitoringLevel level = MonitoringLevel.OFF;
  try {
      Config cfg = ServerBeansFactory.getConfigBean(ApplicationServer.
    getServerContext().getConfigContext());
      String levelStr = cfg.getMonitoringService().
    getModuleMonitoringLevels().getEjbContainer();
      level = MonitoringLevel.instance(levelStr);
  } catch (ConfigException configEx) {
      _logger.log(Level.WARNING, "ejb_base_stats_mediator_configex",
        configEx);
View Full Code Here

                                                                         //SSL_MUTH_AUTH ports? bug 6321813
  for (int i = 0; i < serverRefs.length; i++) {
      Server server =
    ServerHelper.getServerByName(configCtx, serverRefs[i].getRef());
      String configRef = server.getConfigRef();
      Config config =
    ConfigAPIHelper.getConfigByName(configCtx, configRef);
      IiopService iiopService = config.getIiopService();
      listeners[i] = iiopService.getIiopListener();
  }
  return listeners;
    }
View Full Code Here

   
    boolean checkMonitoringEnabled() throws ConfigException {
        ServerContext srCtx = ApplicationServer.getServerContext();
        ConfigContext cfgCtx = srCtx.getConfigContext();
        Config instanceCfg = ServerBeansFactory.getConfigBean(cfgCtx);
       
        MonitoringLevel monitoringLevel = MonitoringLevel.OFF;

        if (instanceCfg.getMonitoringService() != null) {
            ModuleMonitoringLevels levels =
                instanceCfg.getMonitoringService().getModuleMonitoringLevels();
            if (levels != null) {
                monitoringLevel = MonitoringLevel.instance(
                                                levels.getHttpService());
            }
        }
View Full Code Here

        try {
            ArrayList<HttpListener> enabledListeners = new ArrayList<HttpListener>();
         
            Server serv = instance.getServer();
            ConfigContext cfgCtx = InstanceHangAction.configCtx;
            Config cfg = ServerHelper.getConfigForServer(cfgCtx, serv.getName());
       
            // get http-listeners on this server
            HttpService httpSrv = cfg.getHttpService();
            HttpListener[] listeners = httpSrv.getHttpListener();
            for (HttpListener listener : listeners) {
                if (listener.isEnabled()) {
                    enabledListeners.add(listener);
                    //count++;         
View Full Code Here

     */
    private static String getPort(boolean secure) {
        try {
            ConfigContext configContext = ApplicationServer.getServerContext().getConfigContext();
            final String serverName = System.getProperty(SystemPropertyConstants.SERVER_NAME);
            Config config = ServerHelper.getConfigForServer(configContext, serverName);
            final HttpListener[] listeners = config.getHttpService().getHttpListener();
            for (HttpListener listener : listeners) {
                if ((secure) && (listener.isSecurityEnabled())) {
                    return listener.getPort();
                } else if ((!secure) && (!listener.isSecurityEnabled())) {
                    return listener.getPort();
View Full Code Here

                InstanceEnvironment inst =
                        new InstanceEnvironment(instanceName);
                String backURL = inst.getConfigFilePath();
                ConfigContext context = ConfigFactory.
                        createConfigContext(backURL);
                Config rootElement = ServerBeansFactory.getConfigBean(context);

                HttpService httpService = rootElement.getHttpService();
                HttpListener[] httpListeners =
                        httpService.getHttpListener();
                for (int j = 0 ; j < httpListeners.length ; j++) {
                    String aPort = httpListeners[j].getPort();
                    aPort = aPort.trim();
View Full Code Here

                        new InstanceEnvironment(instanceName);
                String backURL = inst.getConfigFilePath();
                ConfigContext context = ConfigFactory.
                        createConfigContext(backURL);

                Config rootElement = ServerBeansFactory.getConfigBean(context);

                IiopService iiopService = rootElement.getIiopService();
                IiopListener[] iiopListeners = iiopService.getIiopListener();
                for (int j = 0 ; j < iiopListeners.length ; j++) {
                    String aPort = iiopListeners[j].getPort();
                    aPort = aPort.trim();
                    sLogger.log(Level.FINE, "port = " + aPort);
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.