KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > management > config > ConfigRunMeFirstTest


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.management.config;
24
25 import java.util.Set JavaDoc;
26
27 import com.sun.appserv.management.base.AMX;
28 import com.sun.appserv.management.base.Util;
29 import com.sun.appserv.management.util.misc.ExceptionUtil;
30
31 import com.sun.appserv.management.config.DomainConfig;
32 import com.sun.appserv.management.config.ConfigConfig;
33 import com.sun.appserv.management.config.SecurityServiceConfig;
34 import com.sun.appserv.management.config.AdminServiceConfig;
35
36 import com.sun.enterprise.management.AMXTestBase;
37 import com.sun.enterprise.management.config.*;
38 import com.sun.enterprise.management.support.AMXDebugStuff;
39
40
41 /**
42     This test should normally be run before the generic tests
43     so that it can set up default items for many of the config elements
44     so that the generic tests will actually test them. Otherwise,
45     when the generic tests are run, they won't see any instances
46     of many of the AMXConfig MBeans.
47     <p>
48     If there are errors doing this, disable this test in amxtest.classes,
49     fix the error in the specific place it's occurring, then re-enabled
50     this test.
51  */

52 public final class ConfigRunMeFirstTest extends AMXTestBase
53 {
54         public
55     ConfigRunMeFirstTest( )
56     {
57     }
58     
59         private void
60     setupConfig()
61     {
62         final DomainConfig dc = getDomainConfig();
63         final ConfigConfig cc = getConfigConfig();
64         final SecurityServiceConfig ss = cc.getSecurityServiceConfig();
65         final AdminServiceConfig as = cc.getAdminServiceConfig();
66         
67         AuditModuleConfigTest.ensureDefaultInstance( ss );
68         
69         AuthRealmConfigTest.ensureDefaultInstance( ss );
70         
71         ConnectorConnectionPoolConfigTest.ensureDefaultInstance( dc );
72         
73         JMXConnectorConfigTest.ensureDefaultInstance( as );
74         
75         ResourceAdapterConfigTest.ensureDefaultInstance( dc );
76         
77         AdminObjectResourceConfigTest.ensureDefaultInstance( dc );
78         
79         JDBCConnectionPoolConfigTest.ensureDefaultInstance( dc );
80         
81         JDBCResourceConfigTest.ensureDefaultInstance( dc );
82         
83         JNDIResourceConfigTest.ensureDefaultInstance( dc );
84         
85         ConnectorResourceConfigTest.ensureDefaultInstance( dc );
86         
87         CustomMBeanConfigTest.ensureDefaultInstance( dc );
88         
89         JACCProviderConfigTest.ensureDefaultInstance( ss );
90         
91         MailResourceConfigTest.ensureDefaultInstance( dc );
92         
93         ThreadPoolConfigTest.ensureDefaultInstance( cc );
94         
95         PersistenceManagerFactoryResourceConfigTest.ensureDefaultInstance( dc );
96         
97         CustomResourceConfigTest.ensureDefaultInstance( dc );
98         
99         ProfilerConfigTest.ensureDefaultInstance( cc.getJavaConfig() );
100         
101         LifecycleModuleConfigTest.ensureDefaultInstance( dc );
102     }
103     
104         public void
105     testSetup()
106     {
107         if ( checkNotOffline( "testIllegalCreate" ) )
108         {
109             setupConfig();
110         }
111     }
112 }
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
Popular Tags