1 25 26 package org.objectweb.easybeans.jsr77; 27 28 import javax.management.MBeanException ; 29 30 import org.objectweb.easybeans.api.Factory; 31 import org.objectweb.easybeans.jmx.MBeansException; 32 import org.objectweb.easybeans.jmx.MBeansHelper; 33 34 38 public class EJBModuleMBean extends J2EEModuleMBean { 39 40 44 public EJBModuleMBean() throws MBeanException { 45 super(); 46 } 47 48 51 public String [] getEjbs() { 52 53 int size = getManagedComponent().getFactories().size(); 54 String [] ejbs = new String [size]; 55 int index = 0; 56 for(Factory f : getManagedComponent().getFactories()) { 57 try { 58 ejbs[index] = MBeansHelper.getInstance().getObjectName(f); 59 } catch (MBeansException e) { 60 ejbs[index] = ""; 61 } 62 63 index++; 64 } 65 return ejbs; 66 } 67 68 69 } 70 | Popular Tags |