00001
00026 package org.objectweb.jonas.webapp.jonasadmin.jonasserver;
00027
00028 import java.io.IOException;
00029
00030 import javax.management.ObjectName;
00031 import javax.servlet.ServletException;
00032 import javax.servlet.http.HttpServletRequest;
00033 import javax.servlet.http.HttpServletResponse;
00034
00035 import org.apache.struts.action.ActionForm;
00036 import org.apache.struts.action.ActionForward;
00037 import org.apache.struts.action.ActionMapping;
00038 import org.objectweb.jonas.jmx.JonasObjectName;
00039 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction;
00040
00045 public class EditJmxServerAction extends JonasBaseAction {
00046
00047
00048
00049 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form
00050 , HttpServletRequest p_Request, HttpServletResponse p_Response)
00051 throws IOException, ServletException {
00052
00053 m_WhereAreYou.selectNameNode(getTreeBranchName(DEPTH_SERVER), true);
00054
00055 JmxServerForm oForm = (JmxServerForm) p_Form;
00056 try {
00057
00058 ObjectName oObjectName = JonasObjectName.jmxService();
00059
00060 oForm.setMBeanServerId(getStringAttribute(oObjectName, "MBeanServerId"));
00061 oForm.setSpecificationName(getStringAttribute(oObjectName, "SpecificationName"));
00062 oForm.setSpecificationVersion(getStringAttribute(oObjectName, "SpecificationVersion"));
00063 oForm.setSpecificationVendor(getStringAttribute(oObjectName, "SpecificationVendor"));
00064 oForm.setImplementationName(getStringAttribute(oObjectName, "ImplementationName"));
00065 oForm.setImplementationVersion(getStringAttribute(oObjectName, "ImplementationVersion"));
00066 oForm.setImplementationVendor(getStringAttribute(oObjectName, "ImplementationVendor"));
00067 }
00068 catch (Throwable t) {
00069 addGlobalError(t);
00070 saveErrors(p_Request, m_Errors);
00071 return (p_Mapping.findForward("Global Error"));
00072 }
00073
00074
00075 return (p_Mapping.findForward("JmxServer"));
00076 }
00077
00078 }