1 25 26 package org.objectweb.jonas.webapp.jonasadmin.monitoring; 27 28 import java.io.IOException ; 29 30 import javax.management.ObjectName ; 31 import javax.servlet.ServletException ; 32 import javax.servlet.http.HttpServletRequest ; 33 import javax.servlet.http.HttpServletResponse ; 34 35 import org.apache.struts.action.ActionForm; 36 import org.apache.struts.action.ActionForward; 37 import org.apache.struts.action.ActionMapping; 38 import org.objectweb.jonas.jmx.J2eeObjectName; 39 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction; 40 41 44 45 public class EditMemoryAction extends JonasBaseAction { 46 47 49 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form 50 , HttpServletRequest p_Request, HttpServletResponse p_Response) 51 throws IOException , ServletException { 52 MemoryForm oForm = (MemoryForm) p_Form; 54 try { 55 ObjectName oObjectName = J2eeObjectName.J2EEServer(m_WhereAreYou.getCurrentDomainName() 57 , m_WhereAreYou.getCurrentJonasServerName()); 58 oForm.setNumberOfMeasures(getIntegerAttribute(oObjectName, "sizeTableMeasures")); 59 oForm.setRange(getIntegerAttribute(oObjectName, "range")); 60 oForm.refreshGraphic(); 61 } 62 catch (Throwable t) { 63 addGlobalError(t); 64 saveErrors(p_Request, m_Errors); 65 return (p_Mapping.findForward("Global Error")); 66 } 67 return (p_Mapping.findForward("Memory")); 69 } 70 } 71 | Popular Tags |