1 21 22 package org.objectweb.jonas.webapp.jonasadmin.joramplatform; 23 24 import java.io.IOException ; 25 26 import javax.management.ObjectName ; 27 import javax.servlet.ServletException ; 28 import javax.servlet.http.HttpServletRequest ; 29 import javax.servlet.http.HttpServletResponse ; 30 31 import org.apache.struts.action.ActionForm; 32 import org.apache.struts.action.ActionForward; 33 import org.apache.struts.action.ActionMapping; 34 35 import org.objectweb.jonas.jmx.JonasManagementRepr; 36 import org.objectweb.jonas.jmx.JonasObjectName; 37 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction; 38 39 42 43 public class GetJoramRemoteServerDestinationsAction extends JonasBaseAction { 44 45 47 64 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form 65 , HttpServletRequest p_Request, HttpServletResponse p_Response) 66 throws IOException , ServletException { 67 68 ObjectName oName = null; 70 try { 71 String id = "1"; 72 oName = JonasObjectName.joramRemoteServer(id); 73 JonasManagementRepr.invoke(oName, "retrieveDestinations", null, null); 74 } catch (Throwable t) { 75 addGlobalError(t); 76 saveErrors(p_Request, m_Errors); 77 return (p_Mapping.findForward("Global Error")); 78 } 79 80 return (p_Mapping.findForward("JoramRemoteServer")); 82 } 83 } 84 | Popular Tags |