1 25 26 package org.objectweb.jonas.webapp.jonasadmin.service.discovery; 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.JonasObjectName; 39 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction; 40 import org.objectweb.jonas.webapp.jonasadmin.WhereAreYou; 41 42 45 46 public class EditServiceDiscoveryAction extends JonasBaseAction { 47 48 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form 50 , HttpServletRequest p_Request, HttpServletResponse p_Response) 51 throws IOException , ServletException { 52 53 m_WhereAreYou.selectNameNode(getTreeBranchName(DEPTH_SERVER) + WhereAreYou.NODE_SEPARATOR 55 + "services" + WhereAreYou.NODE_SEPARATOR + "discovery", true); 56 DiscoveryServiceForm oForm = (DiscoveryServiceForm) p_Form; 58 59 ObjectName oObjectName = JonasObjectName.discoveryService(); 60 oForm.setMulticastAddress(getStringAttribute(oObjectName, "MulticastAddress")); 61 oForm.setMulticastPort(getStringAttribute(oObjectName, "MulticastPort")); 62 oForm.setMaster(getBooleanAttribute(oObjectName, "IsDiscoveryMaster")); 63 return (p_Mapping.findForward("Service Discovery")); 65 66 } 67 } | Popular Tags |