Package com.sun.appserv.management.config

Examples of com.sun.appserv.management.config.ConnectorConnectionPoolConfig


            }
        )
    public static void saveConnectorSecurityMap(HandlerContext handlerCtx) {
       
        String poolName = (String) handlerCtx.getInputValue("poolName");
        ConnectorConnectionPoolConfig pool = AMXUtil.getDomainConfig().getConnectorConnectionPoolConfigMap().get(poolName);
        if (pool == null){
            GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchConnectorConnectionPool"));
            return;
        }
        String securityMapName = (String) handlerCtx.getInputValue("securityMapName");
        String userName = (String) handlerCtx.getInputValue("userName");
        String password = (String) handlerCtx.getInputValue("password");
        String option = (String) handlerCtx.getInputValue("usersOption");
        String userGroups = (String) handlerCtx.getInputValue("userGroups");
        String principals = (String) handlerCtx.getInputValue("principals");
        String value = null;
        String[] str = null;
        boolean usePrincipals = false;
        //Take either userGroups or Principals
        if(option.equals("users")){
             value = userGroups;
             usePrincipals = false;
        } else {
            value = principals;
            usePrincipals = true;
        }
       /* boolean usePrincipals = false;
        if (GuiUtil.isEmpty(userGroups)){
            value = principals;
            usePrincipals = true;
        }else{
            value = userGroups;
            usePrincipals = false;
        }
        */
        if (value != null && value.indexOf(",") != -1) {
            str = GuiUtil.stringToArray(value, ",");
        } else {
            str = new String[1];
            str[0] = value;
        }
        try{
             if (! (Boolean) handlerCtx.getInputValue("edit")){
                pool.createSecurityMapConfig(securityMapName, userName, password,
                   (usePrincipals)? str : null, (usePrincipals)? null: str);
                return;
             }
       
            SecurityMapConfig securityMap = pool.getSecurityMapConfigMap().get(securityMapName);

            //Remove all the old user groups and principals and add them back
            String[] oldGroups = securityMap.getUserGroupNames();
            if (oldGroups != null && oldGroups.length >0){
                for(int i=0; i<oldGroups.length; i++)
View Full Code Here


            "com.sun.appserv:type=resources,category=config",
            "createJmsResource", params, types);
        
         //work around a bug that is-connection-validation-required attribute was ignored during creation
         String jndiName = (String) handlerCtx.getInputValue("jndiName");
         ConnectorConnectionPoolConfig pool = AMXUtil.getDomainConfig().getConnectorConnectionPoolConfigMap().get(jndiName);

         //for Window, sometimes we need to put in a little delay
         int ix = 0;
         while( (pool == null) && ix < 10){
            Thread.sleep(1000);
            pool = AMXUtil.getDomainConfig().getConnectorConnectionPoolConfigMap().get(jndiName);
            ix++;
         }
         pool.setConnectionValidationRequired ((Boolean) handlerCtx.getInputValue("isConnectionValidationRequired"));
         JavaMailHandlers.createNewTargets(handlerCtx,  jndiName);
        
        }catch (Exception ex){
            GuiUtil.handleException(handlerCtx, ex);
        }
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.config.ConnectorConnectionPoolConfig

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.