1 25 26 package org.objectweb.jonas.webapp.jonasadmin.resource; 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.JonasManagementRepr; 39 import org.objectweb.jonas.jmx.JonasObjectName; 40 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction; 41 42 45 public class ApplyConfirmDestinationsAction 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 53 ItemsDestinationsForm oForm = (ItemsDestinationsForm) m_Session.getAttribute("itemsDestinationsForm"); 55 try { 56 String [] asParam = new String [1]; 57 String [] asSignature = {"java.lang.String"}; 58 ObjectName onJmsMB = JonasObjectName.jmsService(); 59 for (int i = 0; i < oForm.getSelectedItems().length; i++) { 60 asParam[0] = (String ) oForm.getSelectedItems()[i]; 61 JonasManagementRepr.invoke(onJmsMB, "removeJmsDestination", asParam, asSignature); 62 } 63 } catch (Throwable t) { 64 addGlobalError(t); 65 saveErrors(p_Request, m_Errors); 66 return (p_Mapping.findForward("Global Error")); 67 } 68 69 return (p_Mapping.findForward("ActionListJmsResources")); 71 } 72 } 73 | Popular Tags |