1 25 26 package org.objectweb.easybeans.container.session; 27 28 import org.objectweb.easybeans.api.EZBContainer; 29 import org.objectweb.easybeans.jmx.MBeansException; 30 import org.objectweb.easybeans.jmx.MBeansHelper; 31 import org.objectweb.easybeans.jsr77.JSR77ManagementIdentifier; 32 33 39 public abstract class SessionFactoryIdentifier<T extends SessionFactory> extends 40 JSR77ManagementIdentifier<T> { 41 42 45 public String getAdditionnalProperties(final T instance) { 46 StringBuilder sb = new StringBuilder (); 47 EZBContainer container = instance.getContainer(); 49 String parent = null; 50 try { 51 parent = MBeansHelper.getInstance().getObjectName(container); 52 sb.append(getParentNameProperty(parent)); 53 54 } catch (MBeansException e) { 56 getLogger().warn("Cannot retrieve parent ObjectName for ''{0}''", sb); 57 } 58 59 return sb.toString(); 60 } 61 62 65 public String getNamePropertyValue(final T instance) { 66 return instance.getClassName(); 67 } 68 69 } 70 | Popular Tags |