1 23 24 29 30 package com.sun.enterprise.management.j2ee; 31 32 import java.util.Set ; 33 34 import javax.management.ObjectName ; 35 import javax.management.AttributeNotFoundException ; 36 37 import com.sun.appserv.management.j2ee.J2EEModule; 38 import com.sun.appserv.management.j2ee.J2EEServer; 39 40 41 import com.sun.appserv.management.base.Util; 42 43 44 import com.sun.appserv.management.util.jmx.JMXUtil; 45 import com.sun.appserv.management.util.misc.GSetUtil; 46 47 import com.sun.appserv.management.j2ee.J2EETypes; 48 49 import com.sun.enterprise.management.support.Delegate; 50 51 53 public class J2EEModuleImplBase extends J2EEDeployedObjectImplBase 54 { 55 public 56 J2EEModuleImplBase( 57 final Delegate delegate ) 58 { 59 super( delegate ); 60 } 61 62 private static final Set <String > NOT_SUPERFLUOUS = 63 GSetUtil.newUnmodifiableStringSet( 64 "getJVMObjectName" 65 ); 66 protected Set <String > 67 getNotSuperfluousMethods() 68 { 69 return NOT_SUPERFLUOUS; 70 } 71 72 73 protected boolean 74 isStandalone() 75 { 76 return getObjectName() != null && 78 getKeyProperty( J2EETypes.J2EE_APPLICATION ).equals( NULL_NAME ); 79 } 80 81 public boolean 82 isConfigProvider() 83 { 84 return( super.isConfigProvider() && getObjectName() != null && isStandalone() ); 85 } 86 87 public String [] 88 getjavaVMs() 89 { 90 return( getJ2EEServer().getjavaVMs() ); 91 } 92 93 public ObjectName 94 getJVMObjectName() 95 { 96 return Util.getObjectName( getJ2EEServer().getJVM() ); 97 } 98 99 100 101 public boolean 102 isstateManageable() 103 { 104 return isStandAlone(); 105 } 106 107 private boolean 108 isStandAlone() 109 { 110 return !getContainer().getJ2EEType().equals( J2EETypes.J2EE_APPLICATION ); 111 } 112 } 113 | Popular Tags |