1 25 26 package org.objectweb.easybeans.container.management; 27 28 import org.objectweb.easybeans.api.EZBContainer; 29 import org.objectweb.easybeans.api.EZBServer; 30 import org.objectweb.easybeans.jmx.MBeansException; 31 import org.objectweb.easybeans.jmx.MBeansHelper; 32 import org.objectweb.easybeans.jsr77.JSR77ManagementIdentifier; 33 34 39 public class JContainer3Identifier extends 40 JSR77ManagementIdentifier<EZBContainer> { 41 42 45 private static final String TYPE = "EJBModule"; 46 47 50 public String getAdditionnalProperties(final EZBContainer instance) { 51 StringBuilder sb = new StringBuilder (); 52 EZBServer server = instance.getConfiguration().getEZBServer(); 54 String parent = null; 55 try { 56 parent = MBeansHelper.getInstance().getObjectName(server); 57 sb.append(getParentNameProperty(parent)); 58 59 } catch (MBeansException e) { 61 getLogger().warn("Cannot retrieve parent ObjectName for ''{0}''", sb); 62 } 63 64 return sb.toString(); 65 } 66 67 70 public String getNamePropertyValue(final EZBContainer instance) { 71 return instance.getName().replace(":", "|"); 72 } 73 74 77 public String getTypeValue() { 78 return TYPE; 79 } 80 81 } 82 | Popular Tags |