}
}
public JBossStatistics listStatistics()
{
final ManagedConnectionPoolStatistics subPoolStats = new JBossManagedConnectionPoolStatistics(subPools.size());
subPoolStats.setBlockingTimeout(poolParams.blockingTimeout);
subPoolStats.setIdleTimeout(poolParams.idleTimeout);
subPoolStats.setMax(poolParams.maxSize);
subPoolStats.setMin(poolParams.minSize);
subPoolStats.setPrefill(poolParams.prefill);
subPoolStats.setNoTxnSeperatePool(noTxSeparatePools);
for(Iterator iter = subPools.values().iterator(); iter.hasNext();)
{
JBossSubPoolStatistics stat = new JBossSubPoolStatistics();
SubPoolContext subContext = (SubPoolContext)iter.next();
Boolean trackByTxn = (subContext.getTrackByTx() != null) ? Boolean.TRUE : Boolean.FALSE;
stat.setTrackByTxn(trackByTxn);
final InternalManagedConnectionPool internalPool = subContext.getSubPool();
stat.setAvailableConnections(internalPool.getAvailableConnections());
stat.setConnectionsDestroyed(internalPool.getConnectionDestroyedCount());
stat.setConnectionsInUse(internalPool.getConnectionInUseCount());
stat.setMaxConnectionsInUse(internalPool.getMaxConnectionsInUseCount());
stat.setTotalBlockTime(internalPool.getTotalBlockTime());
stat.setAverageBlockTime(internalPool.getAverageBlockTime());
stat.setMaxWaitTime(internalPool.getMaxWaitTime());
stat.setTotalTimedOut(internalPool.getTimedOut());
subPoolStats.addSubPool(stat);
}
return (JBossStatistics)subPoolStats;
}