1 23 24 29 package com.sun.enterprise.management; 30 31 import java.util.Set ; 32 import java.util.Map ; 33 import java.util.Iterator ; 34 import java.io.IOException ; 35 36 import javax.management.ObjectName ; 37 import javax.management.AttributeList ; 38 import javax.management.MBeanServerConnection ; 39 import javax.management.NotCompliantMBeanException ; 40 41 import com.sun.appserv.management.DomainRoot; 42 import com.sun.appserv.management.j2ee.J2EEDomain; 43 import com.sun.appserv.management.base.NotificationEmitterService; 44 45 46 import com.sun.appserv.management.util.jmx.MBeanServerConnectionConnectionSource; 47 48 import com.sun.enterprise.management.support.AMXNonConfigImplBase; 49 import com.sun.enterprise.management.support.QueryMgrImpl; 50 51 import com.sun.appserv.management.util.misc.ExceptionUtil; 52 53 55 public final class DomainRootTest extends AMXTestBase 56 { 57 58 public 59 DomainRootTest( ) 60 throws IOException 61 { 62 } 63 64 public void 65 testGetDomain() 66 { 67 getDomainRoot(); 68 } 69 70 public void 71 testGetDeploymentMgr() 72 { 73 assert( getDomainRoot().getDeploymentMgr() != null ); 74 } 75 76 public void 77 testGetConfigDottedNames() 78 { 79 if ( checkNotOffline( "testGetConfigDottedNames" ) ) 80 { 81 assert( getDomainRoot().getConfigDottedNames() != null ); 82 } 83 } 84 85 public void 86 testGetMonitoringDottedNames() 87 { 88 if ( checkNotOffline( "testGetConfigDottedNames" ) ) 89 { 90 assert( getDomainRoot().getMonitoringDottedNames() != null ); 91 } 92 } 93 94 95 public void 96 testGetDomainNotificationEmitterService() 97 { 98 assert( getDomainRoot().getDomainNotificationEmitterService() != null ); 99 } 100 101 102 public void 103 testGetDomainNotificationEmitterServiceMap() 104 { 105 final Map <String ,NotificationEmitterService> services = 106 getDomainRoot().getNotificationEmitterServiceMap(); 107 assert( services != null ); 108 109 for( NotificationEmitterService s : services.values() ) 110 { 111 s.getListenerCount(); 112 } 113 } 114 115 116 public void 117 testAMXReady() 118 { 119 final DomainRoot domainRoot = getDomainRoot(); 120 121 while ( ! domainRoot.getAMXReady() ) 122 { 123 mySleep( 10 ); 124 } 125 } 126 127 public void 128 testWaitAMXReady() 129 { 130 final DomainRoot domainRoot = getDomainRoot(); 131 132 domainRoot.waitAMXReady(); 133 } 134 } 135 136 137 | Popular Tags |