1 26 27 package org.objectweb.jonas.webapp.jonasadmin.monitoring; 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.J2eeObjectName; 40 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction; 41 42 45 46 public class ApplyMonitoringAction 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 MonitoringForm oForm = (MonitoringForm) p_Form; 57 ObjectName oObjectName = null; 59 try { 60 oObjectName = J2eeObjectName.J2EEServer(m_WhereAreYou.getCurrentDomainName() 61 , m_WhereAreYou.getCurrentJonasServerName()); 62 setBooleanAttribute(oObjectName, "activated", oForm.isActivated()); 64 } 65 catch (Throwable t) { 66 addGlobalError(t); 67 saveErrors(p_Request, m_Errors); 68 return (p_Mapping.findForward("Global Error")); 69 } 70 71 return (p_Mapping.findForward("Monitoring")); 73 } 74 } 75 | Popular Tags |