Package com.sun.appserv.management.config

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


            @HandlerOutput(name="properties", type=java.util.Map.class)
            })
        public static void getConnectorConnectionPoolProperty(HandlerContext handlerCtx) {
       
            String jndiName = (String) handlerCtx.getInputValue("jndiName");
            ConnectorConnectionPoolConfig pool = AMXUtil.getDomainConfig().getConnectorConnectionPoolConfigMap().get(jndiName);
            if (pool == null){
                GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchConnectorConnectionPool"));
                return;
            }
            Map<String, String> props = pool.getProperties();
            handlerCtx.setOutputValue("properties", props);
        }
View Full Code Here


        })
    public static void saveConnectorConnectionPool(HandlerContext handlerCtx) {

        try{
            String jndiName = (String) handlerCtx.getInputValue("jndiName");
            ConnectorConnectionPoolConfig pool = AMXUtil.getDomainConfig().getConnectorConnectionPoolConfigMap().get(jndiName);
            if (pool == null){
                GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchConnectorConnectionPool"));
                return;
            }
            //For JMS connection Factory Edit, we don't save the description.
            //description for JMS connectionFacatory applies to connector resource
            Boolean jmsFactory = ((Boolean)handlerCtx.getInputValue("jmsFactory"));
            if (jmsFactory == null || jmsFactory.booleanValue()==false){
                pool.setDescription((String) handlerCtx.getInputValue("description"));
            }
            pool.setMaxPoolSize ((String) handlerCtx.getInputValue("maxPoolSize"));
            pool.setSteadyPoolSize ((String) handlerCtx.getInputValue("steadyPoolSize"));
            pool.setPoolResizeQuantity ((String) handlerCtx.getInputValue("poolResizeQuantity"));
            pool.setIdleTimeoutInSeconds ((String) handlerCtx.getInputValue("idleTimeoutInSeconds"));
            pool.setMaxWaitTimeInMillis ((String) handlerCtx.getInputValue("maxWaitTimeInMillis"));
            pool.setConnectionValidationRequired ((Boolean) handlerCtx.getInputValue("isConnectionValidationRequired"));
            pool.setTransactionSupport ((String) handlerCtx.getInputValue("transactionSupport"));
            pool.setFailAllConnections ((Boolean) handlerCtx.getInputValue("failAllConnections"));
        }catch (Exception ex){
           GuiUtil.handleException(handlerCtx, ex);
        }
    }
View Full Code Here

        })
    public static void saveConnectorConnectionPoolProperty(HandlerContext handlerCtx) {

        try{
            String jndiName = (String) handlerCtx.getInputValue("jndiName");
            ConnectorConnectionPoolConfig pool = AMXUtil.getDomainConfig().getConnectorConnectionPoolConfigMap().get(jndiName);
            if (pool == null){
                GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchConnectorConnectionPool"));
                return;
            }
            AMXUtil.editProperties(handlerCtx, pool);
View Full Code Here

                @HandlerOutput(name="advance", type=Map.class)}
        )
        public static void getConnectorPoolAdvanceInfo(HandlerContext handlerCtx) {
       
            String jndiName = (String) handlerCtx.getInputValue("jndiName");
            ConnectorConnectionPoolConfig pool = AMXUtil.getDomainConfig().getConnectorConnectionPoolConfigMap().get(jndiName);
            if (pool == null){
    GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.noSuchConnectorConnectionPool"));
                return;
            }
            Map advance = new HashMap();
           
            advance.put("validateAtMostOncePeriodInSeconds", pool.getValidateAtMostOncePeriodInSeconds());
            advance.put("connectionLeakTimeoutInSeconds", pool.getConnectionLeakTimeoutInSeconds());
            advance.put("connectionLeakReclaim", StringToBooleanpool.getConnectionLeakReclaim()));
            advance.put("connectionCreationRetryAttempts", pool.getConnectionCreationRetryAttempts());
            advance.put("connectionCreationRetryIntervalInSeconds", pool.getConnectionCreationRetryIntervalInSeconds());
            advance.put("lazyConnectionEnlistment", StringToBoolean( pool.getLazyConnectionEnlistment()));
            advance.put("lazyConnectionAssociation", StringToBoolean( pool.getLazyConnectionAssociation()));
            advance.put("associateWithThread", StringToBoolean( pool.getAssociateWithThread()));
            advance.put("matchConnections", StringToBoolean( pool.getMatchConnections()));
            advance.put("maxConnectionUsageCount", pool.getMaxConnectionUsageCount());
            handlerCtx.setOutputValue("advance", advance);
        }
View Full Code Here

                @HandlerOutput(name="advance", type=Map.class)}
        )
        public static void getConnectorPoolAdvanceDefaultInfo(HandlerContext handlerCtx) {
       
            String jndiName = (String) handlerCtx.getInputValue("jndiName");
            ConnectorConnectionPoolConfig pool = AMXUtil.getDomainConfig().getConnectorConnectionPoolConfigMap().get(jndiName);
            if (pool == null){
    GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.noSuchConnectorConnectionPool"));
                return;
            }
            Map advance = new HashMap();
View Full Code Here

      )
    public static void saveConnectorPoolAdvanceInfo(HandlerContext handlerCtx) {
        try{
            String jndiName = (String) handlerCtx.getInputValue("jndiName");
            Map advance = (Map) handlerCtx.getInputValue("advance");
            ConnectorConnectionPoolConfig pool = AMXUtil.getDomainConfig().getConnectorConnectionPoolConfigMap().get(jndiName);
                if (pool == null){
        GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.noSuchConnectorConnectionPool"));
                    return;
                }
                //uncomment the following with issue#1638 is fixed.
                pool.setValidateAtMostOncePeriodInSeconds((String) advance.get("validateAtMostOncePeriodInSeconds"));
                pool.setConnectionLeakTimeoutInSeconds((String) advance.get("connectionLeakTimeoutInSeconds"));
                pool.setConnectionLeakReclaim( BooleanToString(advance.get("connectionLeakReclaim")));
                pool.setConnectionCreationRetryAttempts((String) advance.get("connectionCreationRetryAttempts"));
                pool.setConnectionCreationRetryIntervalInSeconds((String) advance.get("connectionCreationRetryIntervalInSeconds"));
                pool.setLazyConnectionEnlistment(BooleanToString( advance.get("lazyConnectionEnlistment")));
                pool.setLazyConnectionAssociation(BooleanToString( advance.get("lazyConnectionAssociation")));
                pool.setAssociateWithThread(BooleanToString( advance.get("associateWithThread")));
                pool.setMatchConnections(BooleanToString( advance.get("matchConnections")));
                pool.setMaxConnectionUsageCount((String) advance.get("maxConnectionUsageCount"));
        }catch (Exception ex){
             GuiUtil.handleException(handlerCtx, ex);
        }
    }
View Full Code Here

                String connectionDef = (String) extra.get("connectionDefinition");
           
                Map allOptions = new HashMap(pool);
                allOptions = AMXUtil.convertToPropertiesOptionMap(propsMap, allOptions);
           
                ConnectorConnectionPoolConfig newPool = AMXUtil.getDomainConfig().createConnectorConnectionPoolConfig(name, resAdapter, connectionDef, allOptions);
                newPool.setDescription((String) extra.get("Description"));
            }catch (Exception ex){
                GuiUtil.handleException(handlerCtx, ex);
             }
  }
View Full Code Here

            @HandlerOutput(name="result", type=java.util.List.class)}
        )
    public static void getConnectorSecurityMaps(HandlerContext handlerCtx) {
       
        String jndiName = (String) handlerCtx.getInputValue("jndiName");
        ConnectorConnectionPoolConfig pool = AMXUtil.getDomainConfig().getConnectorConnectionPoolConfigMap().get(jndiName);
        if (pool == null){
            GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchConnectorConnectionPool"));
            return;
        }
        Map<String, SecurityMapConfig> securityMaps = pool.getSecurityMapConfigMap();
        List result = new ArrayList();
        for(String securityMapName : securityMaps.keySet()){
            HashMap oneRow = new HashMap();
            oneRow.put("name", securityMapName);
            oneRow.put("editLink", "/resourceNode/connectorSecurityMapEdit.jsf?poolName="+jndiName+"&securityMapName="+securityMapName);
View Full Code Here

        @HandlerInput(name="selectedRows", type=List.class, required=true)}
    )
    public static void deleteConnectorSecurityMaps(HandlerContext handlerCtx) {
       
        String jndiName = (String) handlerCtx.getInputValue("jndiName");
        ConnectorConnectionPoolConfig pool = AMXUtil.getDomainConfig().getConnectorConnectionPoolConfigMap().get(jndiName);
        if (pool == null){
            GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchConnectorConnectionPool"));
            return;
        }
        List obj = (List) handlerCtx.getInputValue("selectedRows");
        List<Map> selectedRows = (List) obj;
        try{
            for(Map oneRow : selectedRows){
                pool.removeSecurityMapConfig((String)oneRow.get("name"));
            }
        }catch(Exception ex){
           GuiUtil.prepareAlert(handlerCtx, "error", GuiUtil.getMessage("msg.Error"),ex.getMessage());
        }
    }
View Full Code Here

            }
        )
    public static void getConnectorSecurityMapInfo(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");
        SecurityMapConfig securityMap = pool.getSecurityMapConfigMap().get(securityMapName);
       
        String[] groups = securityMap.getUserGroupNames();
        if (groups != null && groups.length >0){
            String userGroups = groups[0];
            for(int i=1; i<groups.length; i++){
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.