00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 package org.objectweb.jonas.container;
00027
00028
00029 import java.util.ArrayList;
00030
00031 import org.objectweb.jonas.management.j2eemanagement.J2EEModule;
00032 import org.objectweb.jonas_ejb.container.JContainer;
00033
00039 public class EJBModule extends J2EEModule {
00040
00041 protected JContainer cont;
00042
00043
00044 private ArrayList ejbs = new ArrayList();
00045
00046
00047 String containerName = null;
00048 String fileName = null;
00049
00050 public EJBModule(String objectName, JContainer cont, String fileName, String containerName) {
00051 super(objectName);
00052 this.cont = cont;
00053 this.fileName = fileName;
00054 this.containerName = containerName;
00055 }
00056
00057 public String[] getEjbs() {
00058 return ((String[]) ejbs.toArray(new String[ejbs.size()]));
00059 }
00060
00061 protected void addEjb(String ejbObjectName) {
00062 ejbs.add(ejbObjectName);
00063 }
00064
00065 public int getCurrentNumberOfEJB() {
00066 return ejbs.size();
00067 }
00068
00069 public int getCurrentNumberOfBMP() {
00070 return cont.getEntityBMPNb();
00071 }
00072
00073 public int getCurrentNumberOfCMP() {
00074 return cont.getEntityCMPNb();
00075 }
00076
00077 public int getCurrentNumberOfSBF() {
00078 return cont.getStatefulSessionNb();
00079 }
00080
00081 public int getCurrentNumberOfSBL() {
00082 return cont.getStatelessSessionNb();
00083 }
00084
00085 public int getCurrentNumberOfMDB() {
00086 return cont.getMessageDrivenNb();
00087 }
00088
00089 public String getContainerName() {
00090 return containerName;
00091 }
00092
00093 public String getFileName() {
00094 return fileName;
00095 }
00096
00097 }