1 23 24 29 30 31 package com.sun.enterprise.management.config; 32 33 import java.util.Map ; 34 import java.util.Set ; 35 import java.util.Collections ; 36 37 import javax.management.ObjectName ; 38 import javax.management.AttributeList ; 39 40 41 import com.sun.appserv.management.base.XTypes; 42 import com.sun.enterprise.management.support.Delegate; 43 import com.sun.enterprise.management.config.AMXConfigImplBase; 44 import com.sun.enterprise.management.support.oldconfig.OldEJBContainerConfigMBean; 45 46 import com.sun.appserv.management.config.EJBTimerServiceConfigKeys; 47 48 import com.sun.appserv.management.util.misc.GSetUtil; 49 50 51 54 55 public final class EJBTimerServiceConfigFactory extends ConfigFactory 56 { 57 private final OldEJBContainerConfigMBean mOldEJBContainerConfigMBean; 58 public 59 EJBTimerServiceConfigFactory( 60 final ConfigFactoryCallback callbacks) 61 { 62 super( callbacks ); 63 64 mOldEJBContainerConfigMBean = 65 getOldConfigProxies().getOldEJBContainerConfigMBean( getConfigName() ); 66 } 67 68 private final Set <String > LEGAL_OPTIONAL_KEYS = 69 GSetUtil.newUnmodifiableStringSet( 70 EJBTimerServiceConfigKeys.MINIMUM_DELIVERY_INTERVAL_IN_MILLIS_KEY, 71 EJBTimerServiceConfigKeys.MAX_REDELIVERIES_KEY, 72 EJBTimerServiceConfigKeys.TIMER_DATASOURCE_KEY, 73 EJBTimerServiceConfigKeys.REDELIVERY_INTERVAL__INTERNAL_IN_MILLIS_KEY ); 74 75 76 protected Set <String > 77 getLegalOptionalCreateKeys() 78 { 79 return( LEGAL_OPTIONAL_KEYS ); 80 } 81 82 public ObjectName 83 create( final Map <String ,String > attrs ) 84 { 85 final Map <String ,String > params = initParams( attrs ); 86 87 final ObjectName amxName = createChild( params ); 88 89 return( amxName ); 90 } 91 92 93 95 protected void 96 internalRemove( final ObjectName objectName ) 97 { 98 mOldEJBContainerConfigMBean.removeEjbTimerService(); 99 } 100 101 protected ObjectName 102 createOldChildConfig( final AttributeList attrs ) 103 { 104 return mOldEJBContainerConfigMBean.createEjbTimerService( attrs ); 105 } 106 107 } 108 109 | Popular Tags |