1 25 26 package org.objectweb.jonas.webapp.jonasadmin.jonasserver; 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.jmx.JonasManagementRepr; 40 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction; 41 42 45 46 public class JonasServerRunGCAction extends JonasBaseAction { 47 48 50 67 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form 68 , HttpServletRequest p_Request, HttpServletResponse p_Response) 69 throws IOException , ServletException { 70 ObjectName oObjectName = null; 72 try { 73 oObjectName = J2eeObjectName.J2EEServer(m_WhereAreYou.getCurrentDomainName() 74 , m_WhereAreYou.getCurrentJonasServerName()); 75 JonasManagementRepr.invoke(oObjectName, "runGC", null, null); 77 } 78 catch (Throwable t) { 79 addGlobalError(t); 80 saveErrors(p_Request, m_Errors); 81 return (p_Mapping.findForward("Global Error")); 82 } 83 84 return (p_Mapping.findForward("JonasServer")); 86 } 87 } 88 | Popular Tags |