1 25 26 package org.objectweb.jonas.container; 27 28 import java.util.ArrayList ; 30 31 import org.objectweb.jonas.management.j2eemanagement.J2EEModule; 32 import org.objectweb.jonas_ejb.container.JContainer; 33 34 39 public class EJBModule extends J2EEModule { 40 41 protected JContainer cont; 42 43 private ArrayList ejbs = new ArrayList (); 45 46 String containerName = null; 48 String fileName = null; 49 50 public EJBModule(String objectName, JContainer cont, String fileName, String containerName) { 51 super(objectName); 52 this.cont = cont; 53 this.fileName = fileName; 54 this.containerName = containerName; 55 } 56 57 public String [] getEjbs() { 58 return ((String []) ejbs.toArray(new String [ejbs.size()])); 59 } 60 61 protected void addEjb(String ejbObjectName) { 62 ejbs.add(ejbObjectName); 63 } 64 65 public int getCurrentNumberOfEJB() { 66 return ejbs.size(); 67 } 68 69 public int getCurrentNumberOfBMP() { 70 return cont.getEntityBMPNb(); 71 } 72 73 public int getCurrentNumberOfCMP() { 74 return cont.getEntityCMPNb(); 75 } 76 77 public int getCurrentNumberOfSBF() { 78 return cont.getStatefulSessionNb(); 79 } 80 81 public int getCurrentNumberOfSBL() { 82 return cont.getStatelessSessionNb(); 83 } 84 85 public int getCurrentNumberOfMDB() { 86 return cont.getMessageDrivenNb(); 87 } 88 89 public String getContainerName() { 90 return containerName; 91 } 92 93 public String getFileName() { 94 return fileName; 95 } 96 97 } 98 | Popular Tags |