Search in sources :

Example 1 with DomainRoot

use of com.sun.appserv.management.DomainRoot in project Payara by payara.

the class PerformanceTest method xtestQueryMgr.

public synchronized void xtestQueryMgr() throws IllegalAccessException, InvocationTargetException {
    final DomainRoot domainRoot = getDomainRoot();
    final QueryMgr queryMgr = domainRoot.getQueryMgr();
    final String domain = Util.getObjectName(queryMgr).getDomain();
    printPerf("-- QueryMgr --- ");
    testMethod(domainRoot, "getQueryMgr", null, 1000);
    final int ITER = 20;
    testMethod(queryMgr, "queryAllSet", null, ITER);
    testMethod(queryMgr, "querySingletonJ2EEType", new Object[] { XTypes.BULK_ACCESS }, ITER);
    testMethod(queryMgr, "queryJ2EETypeSet", new Object[] { XTypes.SSL_CONFIG }, ITER);
    testMethod(queryMgr, "queryJ2EENameSet", new Object[] { "server" }, ITER);
    testMethod(queryMgr, "queryJ2EETypeNames", new Object[] { XTypes.CONFIG_CONFIG }, ITER);
    testMethod(queryMgr, "queryPatternSet", new Object[] { domain, "j2eeType=" + XTypes.SERVLET_MONITOR }, ITER);
    testMethod(queryMgr, "queryInterfaceSet", new Object[] { SSLConfig.class.getName(), null }, ITER);
}
Also used : QueryMgr(com.sun.appserv.management.base.QueryMgr) SSLConfig(com.sun.appserv.management.config.SSLConfig) DomainRoot(com.sun.appserv.management.DomainRoot)

Example 2 with DomainRoot

use of com.sun.appserv.management.DomainRoot in project Payara by payara.

the class PerformanceTest method xtestDomainConfig.

/*
         public synchronized void
     testTargets()
         throws IllegalAccessException, InvocationTargetException
     {
         DomainConfig domainConfig = getDomainRoot().getDomainConfig();

         final long	start	= now();

         final int	ITER	= 100;
         for( int i = 0; i < ITER; ++i )
         {
             final Mapxxx servers	= domainConfig.getStandaloneServerConfigMap();
             final Mapxxx clusters	= domainConfig.getClusterConfigMap();

             final String[] serverNames	= GSetUtil.toStringArray( servers.keySet() );
             final String[] clusterNames	= GSetUtil.toStringArray( clusters.keySet() );
         }

         final long	elapsed	= now() - start;
         printPerf( "testTargets: " + ITER + " iterations: " + elapsed);
     }
     */
public synchronized void xtestDomainConfig() throws IllegalAccessException, InvocationTargetException {
    final DomainRoot domainRoot = getDomainRoot();
    final DomainConfig domainConfig = domainRoot.getDomainConfig();
    printPerf("-- DomainConfig --- ");
    final int ITER = 20;
    testMethod(domainConfig, "getNodeAgentConfigMap", null, ITER);
    testMethod(domainConfig, "getConfigConfigMap", null, ITER);
    testMethod(domainConfig, "getStandaloneServerConfigMap", null, ITER);
    testMethod(domainConfig, "getClusteredServerConfigMap", null, ITER);
    testMethod(domainConfig, "getServerConfigMap", null, ITER);
    testMethod(domainConfig, "getClusterConfigMap", null, ITER);
    testMethod(domainConfig, "getCustomResourceConfigMap", null, ITER);
    testMethod(domainConfig, "getJNDIResourceConfigMap", null, ITER);
    testMethod(domainConfig, "getPersistenceManagerFactoryResourceConfigMap", null, ITER);
    testMethod(domainConfig, "getJDBCResourceConfigMap", null, ITER);
    testMethod(domainConfig, "getJDBCConnectionPoolConfigMap", null, ITER);
    testMethod(domainConfig, "getConnectorResourceConfigMap", null, ITER);
    testMethod(domainConfig, "getConnectorConnectionPoolConfigMap", null, ITER);
    testMethod(domainConfig, "getAdminObjectResourceConfigMap", null, ITER);
    testMethod(domainConfig, "getResourceAdapterConfigMap", null, ITER);
    testMethod(domainConfig, "getMailResourceConfigMap", null, ITER);
    testMethod(domainConfig, "getJ2EEApplicationConfigMap", null, ITER);
    testMethod(domainConfig, "getEJBModuleConfigMap", null, ITER);
    testMethod(domainConfig, "getWebModuleConfigMap", null, ITER);
    testMethod(domainConfig, "getRARModuleConfigMap", null, ITER);
    testMethod(domainConfig, "getAppClientModuleConfigMap", null, ITER);
    testMethod(domainConfig, "getLifecycleModuleConfigMap", null, ITER);
}
Also used : DomainRoot(com.sun.appserv.management.DomainRoot) DomainConfig(com.sun.appserv.management.config.DomainConfig)

Example 3 with DomainRoot

use of com.sun.appserv.management.DomainRoot in project Payara by payara.

the class ProxyTest method testProxyTime.

/**
 *     This test is designed to check that performance is reasonable and/or
 *     to detect a change that slows things down drastically.
 *     public void
 */
public void testProxyTime() throws Exception {
    final DomainRoot root = (DomainRoot) getDomainRoot();
    final long start = now();
    for (int i = 0; i < 5; ++i) {
        root.getContainer();
        root.getDomainRoot();
        root.getJ2EEDomain();
        root.getDomainConfig();
        root.getQueryMgr();
        root.getBulkAccess();
        root.getUploadDownloadMgr();
        root.getDottedNames();
    }
    final long elapsed = now() - start;
    // should be < 300 ms, so this is a 10X margin...
    assert (elapsed < 300 * 10);
}
Also used : DomainRoot(com.sun.appserv.management.DomainRoot)

Example 4 with DomainRoot

use of com.sun.appserv.management.DomainRoot in project Payara by payara.

the class DomainRootTest method testWaitAMXReady.

public void testWaitAMXReady() {
    final DomainRoot domainRoot = getDomainRoot();
    domainRoot.waitAMXReady();
}
Also used : DomainRoot(com.sun.appserv.management.DomainRoot)

Example 5 with DomainRoot

use of com.sun.appserv.management.DomainRoot in project Payara by payara.

the class TestRunner method testSpeed.

public void testSpeed() throws IOException, JMException {
    final DomainRoot domainRootProxy = ProxyFactory.getInstance(mConn).createDomainRoot();
    final MBeanServerConnection conn = getMBeanServerConnection();
    testGetMBeanInfoSpeed(conn, Util.getObjectName(domainRootProxy).getDomain(), JMXUtil.WILD_ALL);
}
Also used : DomainRoot(com.sun.appserv.management.DomainRoot) MBeanServerConnection(javax.management.MBeanServerConnection)

Aggregations

DomainRoot (com.sun.appserv.management.DomainRoot)7 MBeanServerConnection (javax.management.MBeanServerConnection)2 AMX (com.sun.appserv.management.base.AMX)1 Container (com.sun.appserv.management.base.Container)1 QueryMgr (com.sun.appserv.management.base.QueryMgr)1 DomainConfig (com.sun.appserv.management.config.DomainConfig)1 OfflineConfigIniter (com.sun.appserv.management.config.OfflineConfigIniter)1 SSLConfig (com.sun.appserv.management.config.SSLConfig)1 MBeanServer (javax.management.MBeanServer)1 ObjectName (javax.management.ObjectName)1