1 23 package com.sun.enterprise.management.config; 24 25 import java.util.logging.Level ; 26 27 import com.sun.appserv.management.config.ConfigConfig; 28 import com.sun.appserv.management.config.DiagnosticServiceConfig; 29 30 import com.sun.enterprise.management.AMXTestBase; 31 32 34 public final class DiagnosticServiceConfigTest extends AMXTestBase 35 { 36 public DiagnosticServiceConfigTest() 37 { 38 } 39 40 public void 41 testCreateRemove() 42 { 43 final ConfigConfig config = getConfigConfig(); 44 45 boolean computeChecksum = true; 47 boolean captureInstallLog = true; 48 boolean captureSystemInfo = true; 49 boolean captureHADBInfo = true; 50 boolean captureAppDD = true; 51 boolean verifyConfig = true; 52 String minLogLevel = Level.INFO.toString(); 53 String maxLongEntries = "10000"; 54 55 DiagnosticServiceConfig ds = config.getDiagnosticServiceConfig(); 56 if ( ds != null ) 57 { 58 computeChecksum = ds.getComputeChecksum(); 60 captureInstallLog = ds.getCaptureInstallLog(); 61 captureSystemInfo = ds.getCaptureSystemInfo(); 62 captureHADBInfo = ds.getCaptureHADBInfo(); 63 captureAppDD = ds.getCaptureAppDD(); 64 verifyConfig = ds.getVerifyConfig(); 65 minLogLevel = ds.getMinLogLevel(); 66 maxLongEntries = ds.getMaxLogEntries(); 67 68 config.removeDiagnosticServiceConfig(); 69 ds = null; 70 } 71 72 ds = config.createDiagnosticServiceConfig(); 73 config.removeDiagnosticServiceConfig(); ds = null; 74 75 ds = config.createDiagnosticServiceConfig(); 77 ds.setComputeChecksum( computeChecksum ); 78 ds.setCaptureInstallLog( captureInstallLog); 79 ds.setCaptureSystemInfo( captureSystemInfo ); 80 ds.setCaptureHADBInfo( captureHADBInfo ); 81 ds.setCaptureAppDD( captureAppDD ); 82 ds.setVerifyConfig( verifyConfig ); 83 ds.setMinLogLevel( minLogLevel ); 84 ds.setMaxLogEntries( maxLongEntries ); 85 } 86 87 } 88 89 90 | Popular Tags |