1 26 27 package org.objectweb.jonas.webapp.jonasadmin.service.container; 28 29 import java.io.IOException ; 30 31 import javax.management.ObjectName ; 32 import javax.servlet.ServletException ; 33 import javax.servlet.http.HttpServletRequest ; 34 import javax.servlet.http.HttpServletResponse ; 35 36 import org.apache.struts.action.ActionForm; 37 import org.apache.struts.action.ActionForward; 38 import org.apache.struts.action.ActionMapping; 39 import org.objectweb.jonas.jmx.JonasObjectName; 40 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction; 41 42 45 46 public class EditEjbCsStatisticAction extends JonasBaseAction { 47 48 50 52 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form 53 , HttpServletRequest p_Request, HttpServletResponse p_Response) 54 throws IOException , ServletException { 55 EjbContainersStatisticForm oForm = new EjbContainersStatisticForm(); 57 p_Request.setAttribute("ejbContainersStatisticForm", oForm); 58 59 try { 60 ObjectName oObjectName = JonasObjectName.ejbService(); 62 oForm.setTotalCurrentNumberOfCMPType(getIntegerAttribute(oObjectName 63 , "TotalCurrentNumberOfCMPType")); 64 oForm.setTotalCurrentNumberOfSBFType(getIntegerAttribute(oObjectName 65 , "TotalCurrentNumberOfSBFType")); 66 oForm.setCurrentNumberOfContainer(getIntegerAttribute(oObjectName 67 , "CurrentNumberOfContainer")); 68 oForm.setTotalCurrentNumberOfBMPType(getIntegerAttribute(oObjectName 69 , "TotalCurrentNumberOfBMPType")); 70 oForm.setTotalCurrentNumberOfMDBType(getIntegerAttribute(oObjectName 71 , "TotalCurrentNumberOfMDBType")); 72 oForm.setTotalCurrentNumberOfSBLType(getIntegerAttribute(oObjectName 73 , "TotalCurrentNumberOfSBLType")); 74 oForm.setTotalCurrentNumberOfBeanType(getIntegerAttribute(oObjectName 75 , "TotalCurrentNumberOfBeanType")); 76 } 77 catch (Throwable t) { 78 addGlobalError(t); 79 saveErrors(p_Request, m_Errors); 80 return (p_Mapping.findForward("Global Error")); 81 } 82 83 String sNextForward = (String ) p_Request.getAttribute("NextForward"); 85 if (sNextForward == null) { 86 sNextForward = "Ejb Containers Statistic"; 87 } 88 return (p_Mapping.findForward(sNextForward)); 90 } 91 } 92 | Popular Tags |