1 23 24 package com.sun.enterprise.admin.server.core.mbean.config; 25 26 import javax.management.*; 28 29 import com.sun.enterprise.config.ConfigException; 31 import com.sun.enterprise.config.serverbeans.ServerTags; 32 33 import com.sun.enterprise.admin.server.core.mbean.meta.MBeanEasyConfig; 35 import com.sun.enterprise.admin.common.ObjectNames; 36 import com.sun.enterprise.admin.common.exception.MBeanConfigException; 37 import com.sun.enterprise.admin.common.constant.ConfigAttributeName; 38 39 public class ManagedEjbContainer extends ConfigMBeanBase implements ConfigAttributeName.EjbContainer 40 { 41 private static final String [][] MAPLIST = { 42 { kMinBeansInPool, ATTRIBUTE + ServerTags.STEADY_POOL_SIZE}, 43 { kBeanIncrementCount, ATTRIBUTE + ServerTags.POOL_RESIZE_QUANTITY}, 44 { kMaxPoolSize, ATTRIBUTE + ServerTags.MAX_POOL_SIZE}, 45 { kCacheResizeQuantity, ATTRIBUTE + ServerTags.CACHE_RESIZE_QUANTITY}, 46 { kMaxBeansInCache, ATTRIBUTE + ServerTags.MAX_CACHE_SIZE}, 47 { kIdleInPoolTimeoutInSeconds, ATTRIBUTE + ServerTags.POOL_IDLE_TIMEOUT_IN_SECONDS}, 48 { kIdleInCacheTimeoutInSeconds, ATTRIBUTE + ServerTags.CACHE_IDLE_TIMEOUT_IN_SECONDS}, 49 { kRemovalTimeoutInSeconds, ATTRIBUTE + ServerTags.REMOVAL_TIMEOUT_IN_SECONDS}, 50 { kVictimSelectionAlgorithm, ATTRIBUTE + ServerTags.VICTIM_SELECTION_POLICY}, 51 { kCommitOption, ATTRIBUTE + ServerTags.COMMIT_OPTION }, 52 }; 55 56 private static final String [] ATTRIBUTES = { 57 kMinBeansInPool + ", int, RW", 58 kBeanIncrementCount + ", int, RW", 59 kMaxPoolSize + ", int, RW", 60 kCacheResizeQuantity + ", int, RW", 61 kMaxBeansInCache + ", int, RW", 62 kIdleInPoolTimeoutInSeconds + ", int, RW", 63 kIdleInCacheTimeoutInSeconds + ", int, RW", 64 kRemovalTimeoutInSeconds + ", int, RW", 65 kVictimSelectionAlgorithm + ", String, RW", 66 kCommitOption + ", String, RW", 67 }; 70 71 private static final String [] OPERATIONS = null; 72 73 76 public ManagedEjbContainer() throws MBeanConfigException 77 { 78 this.setDescriptions(MAPLIST, ATTRIBUTES, OPERATIONS); 79 } 80 81 85 public ManagedEjbContainer(String instanceName) throws MBeanConfigException 86 { 87 this(); 88 initialize(ObjectNames.kEjbContainer, new String []{instanceName}); 89 } 90 } 91 | Popular Tags |