1 25 26 package org.objectweb.easybeans.container.mdb.management; 27 28 import org.objectweb.easybeans.api.EZBContainer; 29 import org.objectweb.easybeans.container.mdb.MDBMessageEndPointFactory; 30 import org.objectweb.easybeans.jmx.MBeansException; 31 import org.objectweb.easybeans.jmx.MBeansHelper; 32 import org.objectweb.easybeans.jsr77.JSR77ManagementIdentifier; 33 34 38 public class MDBMessageEndPointFactoryIdentifier extends 39 JSR77ManagementIdentifier<MDBMessageEndPointFactory> { 40 41 44 private static final String TYPE = "MessageDrivenBean"; 45 46 49 public String getTypeValue() { 50 return TYPE; 51 } 52 53 56 public String getAdditionnalProperties(final MDBMessageEndPointFactory instance) { 57 StringBuilder sb = new StringBuilder (); 58 EZBContainer container = instance.getContainer(); 60 String parent = null; 61 try { 62 parent = MBeansHelper.getInstance().getObjectName(container); 63 sb.append(getParentNameProperty(parent)); 64 65 } catch (MBeansException e) { 67 getLogger().warn("Cannot retrieve parent ObjectName for ''{0}''", sb); 68 } 69 70 return sb.toString(); 71 } 72 73 76 public String getNamePropertyValue(final MDBMessageEndPointFactory instance) { 77 return instance.getClassName(); 78 } 79 80 } 81 82 | Popular Tags |