Package org.logicalcobwebs.proxool.admin

Examples of org.logicalcobwebs.proxool.admin.Admin


        connectionValidator = new DefaultConnectionValidator();
       
        if (definition.getStatistics() != null) {
            try {
                admin = new Admin(definition);
            } catch (ProxoolException e) {
                log.error("Failed to initialise statistics", e);
            }
        }
View Full Code Here


     * @param alias identifies the pool
     * @return a sample containing the statistics, or a zero length array if there none
     * @throws ProxoolException if we couldn't find the pool
     */
    public static StatisticsIF[] getStatistics(String alias) throws ProxoolException {
        final Admin monitor = ConnectionPoolManager.getInstance().getConnectionPool(alias).getAdmin();
        if (monitor != null) {
            return monitor.getStatistics();
        } else {
            return new StatisticsIF[0];
        }
    }
View Full Code Here

     * @param statisticsListener the new listener
     * @throws ProxoolException if the pool couldn't be found
     */
    public static void addStatisticsListener(String alias, StatisticsListenerIF statisticsListener) throws ProxoolException {
        // TODO investigate what happens if we add a statistics monitor after we register a listener
        final Admin monitor = ConnectionPoolManager.getInstance().getConnectionPool(alias).getAdmin();
        if (monitor != null) {
            monitor.addStatisticsListener(statisticsListener);
        } else {
            throw new ProxoolException("Statistics are switched off, your can't add a listener");
        }
    }
View Full Code Here

TOP

Related Classes of org.logicalcobwebs.proxool.admin.Admin

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.