KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > server > core > mbean > config > ManagedMdbContainer


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
24 package com.sun.enterprise.admin.server.core.mbean.config;
25
26 //JMX imports
27
import javax.management.*;
28
29 //Config imports
30
import com.sun.enterprise.config.ConfigException;
31 import com.sun.enterprise.config.serverbeans.ServerTags;
32 import com.sun.enterprise.config.ConfigBean;
33
34 //Admin imports
35
import com.sun.enterprise.admin.server.core.mbean.meta.MBeanEasyConfig;
36 import com.sun.enterprise.admin.common.exception.MBeanConfigException;
37 import com.sun.enterprise.admin.common.constant.ConfigAttributeName;
38 import com.sun.enterprise.admin.common.ObjectNames;
39
40 public class ManagedMdbContainer extends ConfigMBeanBase implements ConfigAttributeName.MdbContainer
41 {
42  private static final String JavaDoc[][] MAPLIST = {
43    { kMinBeansInPool, ATTRIBUTE + ServerTags.STEADY_POOL_SIZE },
44    { kBeanIncrementCount, ATTRIBUTE + ServerTags.POOL_RESIZE_QUANTITY},
45    { kMaxPoolSize, ATTRIBUTE + ServerTags.MAX_POOL_SIZE },
46    { kIdleInPoolTimeoutInSeconds, ATTRIBUTE + ServerTags.IDLE_TIMEOUT_IN_SECONDS },
47 //ms1 { kLogLevel, ATTRIBUTE + ServerTags.LOG_LEVEL },
48
//{ kMonitoringEnabled, ATTRIBUTE + ServerTags.MONITORING_ENABLED },
49
};
50
51  private static final String JavaDoc[] ATTRIBUTES = {
52    kMinBeansInPool + ", int, RW",
53    kBeanIncrementCount + ", int, RW",
54    kMaxPoolSize + ", int, RW",
55    kIdleInPoolTimeoutInSeconds + ", int, RW",
56 //ms1 kLogLevel + ", String, RW",
57
// kMonitoringEnabled + ", boolean,RW",
58
};
59
60  private static final String JavaDoc[] OPERATIONS = null;
61  
62  private final String JavaDoc MDB_NODE_PATH ="/server/mdb-container";
63
64     /**
65         Default constructor sets MBean description tables
66     */

67     public ManagedMdbContainer() throws MBeanConfigException
68     {
69         this.setDescriptions(MAPLIST, ATTRIBUTES, OPERATIONS);
70     }
71
72     public ManagedMdbContainer(String JavaDoc instanceName) throws MBeanConfigException
73     {
74         this(); //set description tables
75
initialize(ObjectNames.kMdbContainer, new String JavaDoc[]{instanceName});
76     }
77
78 }
79  
80  
81
Popular Tags