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.webapp.jonasadmin.service.ejb;
00027
00028 import javax.management.ObjectName;
00029
00030 import org.objectweb.jonas.jmx.JonasManagementRepr;
00031
00035 public class EditEjbEntityAction extends EditEjbAction {
00036
00037
00038
00039
00040
00046 protected EjbForm getEjbForm() {
00047 return new EjbEntityForm();
00048 }
00049
00057 protected void fillEjbInfo(EjbForm p_Form, ObjectName p_ObjectName)
00058 throws Exception {
00059 fillEjbGlobalInfo(p_Form, p_ObjectName);
00060
00061 EjbEntityForm oForm = (EjbEntityForm) p_Form;
00062 oForm.setCacheSize(getIntegerAttribute(p_ObjectName, "cacheSize"));
00063 oForm.setMaxCacheSize(getIntegerAttribute(p_ObjectName, "maxCacheSize"));
00064 oForm.setMinPoolSize(getIntegerAttribute(p_ObjectName, "minPoolSize"));
00065 oForm.setPassivationTimeOut(getIntegerAttribute(p_ObjectName, "passivationTimeOut"));
00066 oForm.setInactivityTimeOut(getIntegerAttribute(p_ObjectName, "inactivityTimeOut"));
00067 oForm.setPersistency(getStringAttribute(p_ObjectName, "persistency"));
00068 oForm.setPoolSize(getIntegerAttribute(p_ObjectName, "poolSize"));
00069 oForm.setShared(getBooleanAttribute(p_ObjectName, "shared"));
00070 oForm.setPrefetch(getBooleanAttribute(p_ObjectName, "prefetch"));
00071 oForm.setLockPolicy(getStringAttribute(p_ObjectName, "lockPolicy"));
00072
00073 Integer[] aiEntityCounters = (Integer[]) JonasManagementRepr.getAttribute(p_ObjectName
00074 , "entityCounters");
00075 oForm.setUsedInTxInstance(aiEntityCounters[0].intValue());
00076 oForm.setUsedOutTxInstance(aiEntityCounters[1].intValue());
00077 oForm.setUnusedInstance(aiEntityCounters[2].intValue());
00078 oForm.setPassivatedInstance(aiEntityCounters[3].intValue());
00079 oForm.setRemovedInstance(aiEntityCounters[4].intValue());
00080 }
00081
00087 protected String getEjbForward() {
00088 return "Ejb Entity";
00089 }
00090 }