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.JonasManagementRepr; 39 import org.objectweb.jonas.jmx.JonasObjectName; 40 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction; 41 42 45 46 public class EditJmxServerAction extends JonasBaseAction { 47 48 61 public ActionForward executeAction(ActionMapping pMapping, ActionForm pForm 62 , HttpServletRequest pRequest, HttpServletResponse pResponse) 63 throws IOException , ServletException { 64 m_WhereAreYou.selectNameNode(getTreeBranchName(DEPTH_SERVER), true); 66 JmxServerForm oForm = (JmxServerForm) pForm; 68 try { 69 ObjectName oObjectName = JonasObjectName.jmxService(); 71 oForm.setMBeanServerId(getStringAttribute(oObjectName, "MBeanServerId")); 73 oForm.setSpecificationName(getStringAttribute(oObjectName, "SpecificationName")); 74 oForm.setSpecificationVersion(getStringAttribute(oObjectName, "SpecificationVersion")); 75 oForm.setSpecificationVendor(getStringAttribute(oObjectName, "SpecificationVendor")); 76 oForm.setImplementationName(getStringAttribute(oObjectName, "ImplementationName")); 77 oForm.setImplementationVersion(getStringAttribute(oObjectName, "ImplementationVersion")); 78 oForm.setImplementationVendor(getStringAttribute(oObjectName, "ImplementationVendor")); 79 if (JonasManagementRepr.isRegistered(JonasObjectName.webContainerService())) { 80 oForm.setPresentServletContainer(true); 81 82 } else { 83 oForm.setPresentServletContainer(false); 84 } 85 } catch (Throwable t) { 86 addGlobalError(t); 87 saveErrors(pRequest, m_Errors); 88 return (pMapping.findForward("Global Error")); 89 } 90 91 return (pMapping.findForward("JmxServer")); 93 } 94 95 } 96 | Popular Tags |