Package com.sun.enterprise.config.clientbeans

Examples of com.sun.enterprise.config.clientbeans.ClientContainer


            ConfigContext ctx =
                ConfigFactory.createConfigContext
                (configFile, true, false, false,
                 com.sun.enterprise.config.clientbeans.ClientContainer.class,
     new com.sun.enterprise.config.clientbeans.ClientBeansResolver());
            final ClientContainer cc  =
                ClientBeansFactory.getClientBean(ctx);

            LogService logService = cc.getLogService();
            // could be null if optional "log-service" element is omitted
            if (logService != null) {

                String logLevel = logService.getLevel();
                if (logLevel != null && !logLevel.equals("")) {
                    _logLevel = Level.parse(logLevel);
                }

                String logFileName = cc.getLogService().getFile();
                if (logFileName != null && !logFileName.equals("")) {
                    _clientHandler = new FileHandler(logFileName, true);
                    _clientHandler.setFormatter(new SimpleFormatter());

                    // workaround to delete lockfile upon exit
View Full Code Here


          true,
          false,
          false,
          ClientContainer.class,
          new ClientBeansResolver());
      ClientContainer cc = (ClientContainer)configCtx.getRootConfigBean();
      com.sun.enterprise.config.clientbeans.MessageSecurityConfig[]
    msgConfigs = cc.getMessageSecurityConfig();

      for (int j = 0; msgConfigs != null && j < msgConfigs.length; j++) {

    // single message-security-config for each auth-layer
    //
View Full Code Here

    clientXmlLocation, true,
    false, false,
    ClientContainer.class,
    new ACCEntityResolver());

            ClientContainer cc = ClientBeansFactory.getClientBean(ctx);
       
      host = cc.getTargetServer(0).getAddress();
      port = cc.getTargetServer(0).getPort();

      //check for targetServerEndpoints
      TargetServer[] tServer = cc.getTargetServer();
      String targetServerEndpoints = null;
      for (int i = 0; i < tServer.length; i++) {
          if (targetServerEndpoints == null) {
        targetServerEndpoints = tServer[i].getAddress() +
          ":" + tServer[i].getPort();
    } else {
      // if we come here, that means we have more than 1 target-server elements.
      // in that case FOLB should be enabled
        lb_enabled = true;
        targetServerEndpoints = targetServerEndpoints + "," +
          tServer[i].getAddress() +
          ":" + tServer[i].getPort();
    }
      }
   
            setSSLData(cc);

            //FIXME: what do we do about realm
            ClientCredential cCrd = cc.getClientCredential();
            if(cCrd != null) {
                String uname = null;
                String upass = null;

                // if user entered user/password from command line,
                // it take percedence over the xml file. - y.l. 05/15/02
                if (System.getProperty(LOGIN_NAME) == null) {
                    _logger.config("using login name from client container xml...");
                    //System.setProperty(LOGIN_NAME, cCrd.getUserName());
                    uname = cCrd.getUserName();
                }
                if (System.getProperty(LOGIN_PASSWORD) == null) {
                    _logger.config("using password from client container xml...");
                    // System.setProperty(LOGIN_PASSWORD, cCrd.getPassword());
                    upass = cCrd.getPassword();
                }
                if( uname != null || upass != null ) {
                    UsernamePasswordStore.set(uname, upass);
                }
            }
    String endpoints_property = null;
      // Check if client requires SSL to be used
      ElementProperty[] props = cc.getElementProperty();
      for ( int i=0; i<props.length; i++ ) {
    if ( props[i].getName().equals("ssl") ) {
        if ( props[i].getValue().equals("required") ) {
      (ORBManager.getCSIv2Props()).put(ORBManager.ORB_SSL_CLIENT_REQUIRED,
               "true");
View Full Code Here

    clientXmlLocation, true,
    false, false,
    ClientContainer.class,
    new ACCEntityResolver());

            ClientContainer cc = ClientBeansFactory.getClientBean(ctx);
       
      host = cc.getTargetServer(0).getAddress();
      port = cc.getTargetServer(0).getPort();

      //check for targetServerEndpoints
      TargetServer[] tServer = cc.getTargetServer();
      String targetServerEndpoints = null;
      for (int i = 0; i < tServer.length; i++) {
          if (targetServerEndpoints == null) {
        targetServerEndpoints = tServer[i].getAddress() +
        ":" + tServer[i].getPort();
    } else {
        targetServerEndpoints = targetServerEndpoints + "," +
          tServer[i].getAddress() +
          ":" + tServer[i].getPort();
                    lb_enabled = true;
    }
      }
   
            setSSLData(cc);

            //FIXME: what do we do about realm
            ClientCredential cCrd = cc.getClientCredential();
            if(cCrd != null) {
                String uname = null;
                String upass = null;

                // if user entered user/password from command line,
                // it take percedence over the xml file. - y.l. 05/15/02
                if (System.getProperty(LOGIN_NAME) == null) {
                    _logger.config("using login name from client container xml...");
                    //System.setProperty(LOGIN_NAME, cCrd.getUserName());
                    uname = cCrd.getUserName();
                }
                if (System.getProperty(LOGIN_PASSWORD) == null) {
                    _logger.config("using password from client container xml...");
                    //System.setProperty(LOGIN_PASSWORD, cCrd.getPassword());
                    upass = cCrd.getPassword();
                }
                if( uname != null || upass != null ) {
                    UsernamePasswordStore.set(uname, upass);
                }
            }
    String endpoints_property = null;
      // Check if client requires SSL to be used
      ElementProperty[] props = cc.getElementProperty();
      for ( int i=0; i<props.length; i++ ) {
    if ( props[i].getName().equals("ssl") ) {
        if ( props[i].getValue().equals("required") ) {
      (ORBManager.getCSIv2Props()).put(ORBManager.ORB_SSL_CLIENT_REQUIRED,
               "true");
View Full Code Here

        // auth-layer
        String intercept = null;

        try {
            ClientContainer cc = (ClientContainer)configCtx.getRootConfigBean();
            com.sun.enterprise.config.clientbeans.MessageSecurityConfig[]
                msgConfigs = cc.getMessageSecurityConfig();

            for (int j = 0; msgConfigs != null && j < msgConfigs.length; j++) {

                // single message-security-config for each auth-layer
                //
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.clientbeans.ClientContainer

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.