Package com.sun.appserv.management.config

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


    }
   
         public static JDBCConnectionPoolConfig
  ensureDefaultInstance( final DomainConfig domainConfig )
  {
      JDBCConnectionPoolConfig   result  =
          domainConfig.getJDBCConnectionPoolConfigMap().get(
              getDefaultInstanceName() );
     
      if ( result == null )
      {
View Full Code Here


  }
 
    protected final AMXConfig
  createProgeny(String name, Map<String,String> options )
  {
      final JDBCConnectionPoolConfig  config  =
        getDomainConfig().createJDBCConnectionPoolConfig( name,
        JDBC_DATASOURCE_CLASSNAME,
        options );
    assert( config != null );
    return( config );
View Full Code Here

      JDBCResourceConfig   result  =
          domainConfig.getJDBCResourceConfigMap().get( getDefaultInstanceName() );
     
      if ( result == null )
      {
          final JDBCConnectionPoolConfig  pool =
              JDBCConnectionPoolConfigTest.ensureDefaultInstance( domainConfig );
             
          result  = createInstance( domainConfig,
              getDefaultInstanceName(), pool.getName(), OPTIONAL );
      }
     
      return result;
  }
View Full Code Here

    }
    catch( Exception e )
    {
    }
   
      final JDBCConnectionPoolConfig  config  =
        getDomainConfig().createJDBCConnectionPoolConfig( name, JDBC_DATASOURCE_CLASSNAME, null );
     
      return( config );
  }
View Full Code Here

  public ObjectName  create(
    final String jndiName,
      final String poolName,
      final Map<String,String> optional )
  {
    final JDBCConnectionPoolConfig  pool  = (JDBCConnectionPoolConfig)
      getCallbacks().getProxyFactory().getDomainRoot().getDomainConfig().
        getContainee( XTypes.JDBC_CONNECTION_POOL_CONFIG, poolName );
    if ( pool == null )
    {
      throw new IllegalArgumentException( "JDBCConnectionPoolConfig does not exit: " + poolName );
View Full Code Here

            }
           
            Map allOptions = new HashMap(pool);
            allOptions = AMXUtil.convertToPropertiesOptionMap(properties, allOptions);
           
            JDBCConnectionPoolConfig newPool = AMXUtil.getDomainConfig().createJDBCConnectionPoolConfig(name, datasourceClassname, allOptions);
            newPool.setDescription((String) extra.get("Description"));
        }catch (Exception ex){
      GuiUtil.handleException(handlerCtx, ex);
        }
    }
View Full Code Here

        List result = new ArrayList();
        try{
  Iterator iter = AMXUtil.getDomainConfig().getJDBCConnectionPoolConfigMap().values().iterator();
        if(iter != null ){
            while(iter.hasNext()){
                JDBCConnectionPoolConfig res = (JDBCConnectionPoolConfig)iter.next();
                HashMap oneRow = new HashMap();
                oneRow.put("name", res.getName());
                oneRow.put("selected", (hasOrig)? ConnectorsHandlers.isSelected(res.getName(), selectedList): false);
                oneRow.put("resInfo", ConnectorsHandlers.checkEmpty(res.getResType()));
                oneRow.put("extraInfo", res.getDatasourceClassname());
                oneRow.put("description", ConnectorsHandlers.checkEmpty(res.getDescription()));
                result.add(oneRow);
            }
        }
        }catch (Exception ex){
            ex.printStackTrace();
View Full Code Here

            @HandlerOutput(name="isIsolationLevelGuaranteed", type=Boolean.class)}
                )
        public static void getJdbcConnectionPoolInfo(HandlerContext handlerCtx) {
       
            String jndiName = (String) handlerCtx.getInputValue("jndiName");
            JDBCConnectionPoolConfig pool = AMXUtil.getDomainConfig().getJDBCConnectionPoolConfigMap().get(jndiName);
            if (pool == null){
    GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.noSuchJDBCConnectionPool"));
            }
            handlerCtx.setOutputValue("datasourceClassname", pool.getDatasourceClassname());
            handlerCtx.setOutputValue("resType", pool.getResType());
            handlerCtx.setOutputValue("description", pool.getDescription());
            handlerCtx.setOutputValue("steadyPoolSize", pool.getSteadyPoolSize());
            handlerCtx.setOutputValue("maxPoolSize", pool.getMaxPoolSize());
            handlerCtx.setOutputValue("poolResizeQuantity", pool.getPoolResizeQuantity());
            handlerCtx.setOutputValue("idleTimeoutInSeconds", pool.getIdleTimeoutInSeconds());
            handlerCtx.setOutputValue("maxWaitTimeInMillis", pool.getMaxWaitTimeInMillis());
            handlerCtx.setOutputValue("isConnectionValidationRequired", pool.getIsConnectionValidationRequired());
            handlerCtx.setOutputValue("connectionValidationMethod", pool.getConnectionValidationMethod());
            handlerCtx.setOutputValue("validationTableName", pool.getValidationTableName());
            handlerCtx.setOutputValue("failAllConnections", pool.getFailAllConnections());
            handlerCtx.setOutputValue("allowNonComponentCallers", pool.getAllowNonComponentCallers());
            handlerCtx.setOutputValue("nonTransactionalConnections", pool.getNonTransactionalConnections());
            handlerCtx.setOutputValue("transactionIsolationLevel", pool.getTransactionIsolationLevel());
            handlerCtx.setOutputValue("isIsolationLevelGuaranteed", pool.getIsIsolationLevelGuaranteed());
        }
View Full Code Here

            @HandlerOutput(name="properties",type=Map.class)}
                )
        public static void getJdbcConnectionPoolProperty(HandlerContext handlerCtx) {
       
            String jndiName = (String) handlerCtx.getInputValue("jndiName");
            JDBCConnectionPoolConfig pool = AMXUtil.getDomainConfig().getJDBCConnectionPoolConfigMap().get(jndiName);
            if (pool == null){
    GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.noSuchJDBCConnectionPool"));
            }
            Map<String, String> props = pool.getProperties();
            handlerCtx.setOutputValue("properties", props);
        }
View Full Code Here

        })
    public static void saveJdbcConnectionPool(HandlerContext handlerCtx) {

        try{
            String jndiName = (String) handlerCtx.getInputValue("jndiName");
            JDBCConnectionPoolConfig pool = AMXUtil.getDomainConfig().getJDBCConnectionPoolConfigMap().get(jndiName);
                if (pool == null){
        GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.noSuchJDBCConnectionPool"));
                    return;
                }
            pool.setDatasourceClassname ((String) handlerCtx.getInputValue("datasourceClassname"));
            pool.setResType ((String) handlerCtx.getInputValue("resType"));
            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.setIsConnectionValidationRequired ((Boolean) handlerCtx.getInputValue("isConnectionValidationRequired"));
            String method = (String) handlerCtx.getInputValue("connectionValidationMethod");
            pool.setConnectionValidationMethod (method);
            if ("table".equals(method)){
                String table = (String) handlerCtx.getInputValue("validationTableName");
                if (! GuiUtil.isEmpty(table))
                    pool.setValidationTableName (table);
            }else{
                pool.setValidationTableName("");
            }
            pool.setFailAllConnections ((Boolean) handlerCtx.getInputValue("failAllConnections"));
            pool.setAllowNonComponentCallers ((Boolean) handlerCtx.getInputValue("allowNonComponentCallers"));
            pool.setNonTransactionalConnections ((Boolean) handlerCtx.getInputValue("nonTransactionalConnections"));
            pool.setTransactionIsolationLevel ((String) handlerCtx.getInputValue("transactionIsolationLevel"));
            pool.setIsIsolationLevelGuaranteed ((Boolean) handlerCtx.getInputValue("isIsolationLevelGuaranteed"));
            GuiUtil.prepareSuccessful(handlerCtx);
        }catch (Exception ex){
      GuiUtil.handleException(handlerCtx, ex);
        }
    }
View Full Code Here

TOP

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

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.