Package com.sun.enterprise.resource

Examples of com.sun.enterprise.resource.ResourcePool


                String serverName = null;
                if (notification.getUserData() != null)
                    serverName = (String)((Map)notification.getUserData()).get("com.sun.enterprise.ee.selfmanagement.events.clusterevent.servername");
                if (ResourceHelper.isJdbcPoolReferenced(ctx, poolName, serverName)) {
                    int maxPoolSize = calcMaxPoolSize(poolName);
                    ResourcePool pool = Switch.getSwitch().getPoolManager().getPool(poolName);
                    pool.setMaxPoolSize(maxPoolSize);
                    if(_logger.isLoggable(Level.INFO))
                        _logger.log(Level.INFO, sm.getString("connectionpool.setmaxpoolsize", poolName, maxPoolSize));
                }
            } catch (ConfigException cex) {
                _logger.log(Level.WARNING, sm.getString("action.internal_error"),cex);
View Full Code Here


        return continueWorkerThread;
    }
   
    void gatherStats() {
        Iterator<String> iter = (Iterator<String>)createdPools.keys();
        ResourcePool pool = null;
        String poolName = null;
        long connsInUse = 0;
        while (iter.hasNext()){
            poolName = iter.next();
            pool = Switch.getSwitch().getPoolManager().getPool(poolName);
View Full Code Here

        }
    }
   
    void tuneSteadyPoolSize() {
        Iterator<String> iter = (Iterator<String>)createdPools.keys();
        ResourcePool pool = null;
        String poolName = null;
        int steadyPoolSize = 0;
        while (iter.hasNext()){
            poolName = iter.next();
            pool = Switch.getSwitch().getPoolManager().getPool(poolName);
            steadyPoolSize = (int)createdPools.get(poolName).getApprox90thPercentile();
            if (pool.getSteadyPoolSize() != steadyPoolSize) {
                if(_logger.isLoggable(Level.INFO))
                    _logger.log(Level.INFO, sm.getString("connectionpool.setsteadypoolsize", poolName, pool.getSteadyPoolSize() , steadyPoolSize));
                pool.setSteadyPoolSize(steadyPoolSize);
            }
        }
    }
View Full Code Here

    public void poolCreated(String poolName) {
        if (poolNameMap.get(poolName) == null) {
            return;
        }
        int maxPoolSize = calcMaxPoolSize(poolName);
        ResourcePool pool = Switch.getSwitch().getPoolManager().getPool(poolName);
        pool.setSelfManaged(true);
        pool.setMaxPoolSize(maxPoolSize);
        if(_logger.isLoggable(Level.INFO))
            _logger.log(Level.INFO, sm.getString("connectionpool.setmaxpoolsize", poolName, maxPoolSize));
        if (!pool.isMonitoringEnabled()) {
            pool.setMonitoringEnabledLow();
        }
        createdPools.put(poolName, new BoundedCircularQueue(sampleSize));
    }
View Full Code Here

 
        MonitorableResourcePool[] pools = new MonitorableResourcePool[ jp.length ];
        ConcurrentHashMap poolTable = getPoolManager().getPoolTable();
       
  for( int i = 0 ; i < jp.length; i++ ) {
            ResourcePool p = (ResourcePool) poolTable.get( jp[i].getName() );
            if (p != null && (p instanceof MonitorableResourcePool ) ) {
          pools[i] = (MonitorableResourcePool)p;
            }
  }
 
View Full Code Here

        Map allPools = Switch.getSwitch().getPoolManager().getPoolTable();

        for( int i = 0 ; i < cp.length; i++ ) {
            if (!(cp[i].getName().equalsIgnoreCase(
                            ConnectorConstants.DEFAULT_JMS_ADAPTER))) {
                ResourcePool p = (ResourcePool) allPools.get( cp[i].getName() );

                if (p != null && (p instanceof MonitorableResourcePool )) {
                    poolMap.put(cp[i], (MonitorableResourcePool)p);
                }
            }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.resource.ResourcePool

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.