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 import com.sun.enterprise.config.serverbeans.ServerXPathHelper; 33 34 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 45 public class ManagedJDBCConnectionPool extends ConfigMBeanBase implements ConfigAttributeName.JDBCConnectionPool 46 { 47 50 private static final String [][] MAPLIST = { 51 {kId , ATTRIBUTE + ServerTags.NAME }, 52 {kDatasourceClassName , ATTRIBUTE + ServerTags.DATASOURCE_CLASSNAME}, 53 {kResType , ATTRIBUTE + ServerTags.RES_TYPE }, 54 {kMinConnectionsInPool , ATTRIBUTE + ServerTags.STEADY_POOL_SIZE }, 55 {kMaxConnectionsInPool , ATTRIBUTE + ServerTags.MAX_POOL_SIZE }, 56 {kMaxConnectionsWaitTime , ATTRIBUTE + ServerTags.MAX_WAIT_TIME_IN_MILLIS }, 57 {kConnectionsIncrement , ATTRIBUTE + ServerTags.POOL_RESIZE_QUANTITY }, 58 {kConnectionIdleTimeout , ATTRIBUTE + ServerTags.IDLE_TIMEOUT_IN_SECONDS }, 59 {kTransactionIsolationLevel , ATTRIBUTE + ServerTags.TRANSACTION_ISOLATION_LEVEL }, 60 {kIsIsolationLevelGuaranteed , ATTRIBUTE + ServerTags.IS_ISOLATION_LEVEL_GUARANTEED }, 61 {kIsConnectionValidationRequired , ATTRIBUTE + ServerTags.IS_CONNECTION_VALIDATION_REQUIRED }, 62 {kConnectionValidation , ATTRIBUTE + ServerTags.CONNECTION_VALIDATION_METHOD }, 63 {kValidationTableName , ATTRIBUTE + ServerTags.VALIDATION_TABLE_NAME }, 64 {kFailAllConnections , ATTRIBUTE + ServerTags.FAIL_ALL_CONNECTIONS }, 65 {kDescription , ATTRIBUTE + PSEUDO_ATTR_DESCRIPTION}, 66 }; 67 68 71 private static final String [] ATTRIBUTES = { 72 kId + " ,String, R" , 73 kDatasourceClassName + ", String, RW" , 74 kResType + " ,String, RW" , 75 kMinConnectionsInPool + " ,int, RW" , 76 kMaxConnectionsInPool + " ,int, RW" , 77 kMaxConnectionsWaitTime + " ,int, RW" , 78 kConnectionsIncrement + " ,int, RW" , 79 kConnectionIdleTimeout + " ,int, RW" , 80 kTransactionIsolationLevel + " ,String, RW" , 81 kIsIsolationLevelGuaranteed + " ,boolean, RW" , 82 kIsConnectionValidationRequired + " ,boolean, RW" , 83 kConnectionValidation + " ,String, RW" , 84 kValidationTableName + " ,String, RW" , 85 kFailAllConnections + " ,boolean, RW" , 86 kDescription + ", String, RW" , 87 }; 88 89 92 private static final String [] OPERATIONS = null; 93 94 97 public ManagedJDBCConnectionPool() throws MBeanConfigException 98 { 99 this.setDescriptions(MAPLIST, ATTRIBUTES, OPERATIONS); 100 } 101 102 107 public ManagedJDBCConnectionPool(String instanceName, String poolId) throws MBeanConfigException 108 { 109 this(); initialize(ObjectNames.kJdbcConnectionPoolType, new String []{instanceName, poolId}); 111 } 112 113 } 114 | Popular Tags |