FileDocCategorySizeDatePackage
ConnectionPoolStatsTest.javaAPI DocGlassfish v2 API4388Fri May 04 22:24:06 BST 2007com.sun.enterprise.management.monitor

ConnectionPoolStatsTest

public abstract class ConnectionPoolStatsTest extends AMXMonitorTestBase

Fields Summary
Constructors Summary
public ConnectionPoolStatsTest()

    
Methods Summary
protected voidaccessAllStatistics(com.sun.appserv.management.monitor.statistics.ConnectionPoolStats s)
Verify that every Statistic can be successfully accessed.

	    final RangeStatistic r1	= s.getNumConnUsed();
	    assert( r1 != null );
	    
	    final RangeStatistic r2	= s.getNumConnFree() ;
	    assert( r2 != null );
	    
		final RangeStatistic r3 = s.getConnRequestWaitTime();
	    assert( r3 != null );

	    final CountStatistic c1 = s.getNumConnFailedValidation() ;
	    assert( c1 != null );
	    
	    final CountStatistic c2 = s.getNumConnTimedOut();
	    assert( c2 != null );
	    
		final CountStatistic c3 = s.getWaitQueueLength();
	    assert( c3 != null );
	    
		final CountStatistic c4	= s.getNumConnCreated();
	    assert( c4 != null );
	    
		final CountStatistic c5	= s.getNumConnDestroyed();
	    assert( c5 != null );
		
		//final CountStatistic c6	= s.getNumConnOpened();
	   // assert( c6 != null );
	    
		//final CountStatistic c7	= s.getNumConnClosed();
	   // assert( c7 != null );
	    
		final CountStatistic c8 = s.getAverageConnWaitTime();
	    assert( c8 != null );
    
protected intiterateAllMonitors(java.lang.String j2eeType)

  		final Set	monitors	= getQueryMgr().queryJ2EETypeSet( j2eeType );
  		final Iterator	iter	= monitors.iterator();
  		
  		int	numMonitors	= 0;
  		while ( iter.hasNext() )
  		{
  			final MonitoringStats ms	= (MonitoringStats)iter.next();
  			++numMonitors;
  			nextMonitor( ms );
  		}
  		
  		return numMonitors;
  	
protected abstract voidnextMonitor(com.sun.appserv.management.monitor.MonitoringStats ms)