1 21 22 package org.objectweb.jonas.webapp.jonasadmin.joramplatform; 23 24 import javax.management.ObjectName ; 25 import javax.servlet.http.HttpServletRequest ; 26 import javax.servlet.http.HttpServletResponse ; 27 28 import org.apache.struts.action.ActionForm; 29 import org.apache.struts.action.ActionForward; 30 import org.apache.struts.action.ActionMapping; 31 import org.objectweb.jonas.jmx.JonasManagementRepr; 32 import org.objectweb.jonas.jmx.JoramObjectName; 33 import org.objectweb.jonas.webapp.jonasadmin.WhereAreYou; 34 35 38 39 public class EditJoramResourceAdapterAction extends EditJoramBaseAction { 40 41 43 public ActionForward executeAction(ActionMapping pMapping, ActionForm pForm 44 , HttpServletRequest pRequest, HttpServletResponse pResponse) { 45 46 m_WhereAreYou.selectNameNode(getTreeBranchName(DEPTH_DOMAIN) + WhereAreYou.NODE_SEPARATOR 48 + "joramplatform", true); 49 50 JoramAdapterForm oForm = (JoramAdapterForm) pForm; 52 try { 53 ObjectName joramAdapterON = (ObjectName ) JonasManagementRepr.queryNames(JoramObjectName.joramAdapter()).iterator().next(); 55 oForm.setCollocatedServer(getBooleanAttribute(joramAdapterON, "CollocatedServer")); 56 oForm.setConfigDir(getStringAttribute(joramAdapterON, "PlatformConfigDir")); 57 oForm.setAdminFile(getStringAttribute(joramAdapterON, "AdminFile")); 58 oForm.setPersistentServer(getBooleanAttribute(joramAdapterON, "PersistentPlatform")); 59 oForm.setServerIdTxt(toStringShortAttribute(joramAdapterON, "ServerId")); 60 oForm.setServerName(getStringAttribute(joramAdapterON, "ServerName")); 61 oForm.setHostName(getStringAttribute(joramAdapterON, "HostName")); 62 oForm.setServerPortTxt(toStringIntegerAttribute(joramAdapterON, "ServerPort")); 63 oForm.setCnxPendingTimerTxt(toStringIntegerAttribute(joramAdapterON, "CnxPendingTimer")); 64 oForm.setConnectingTimerTxt(toStringIntegerAttribute(joramAdapterON, "ConnectingTimer")); 65 oForm.setTxPendingTimerTxt(toStringIntegerAttribute(joramAdapterON, "TxPendingTimer")); 66 } catch (Throwable t) { 67 return (treatError(t, pMapping, pRequest)); 68 } 69 70 return (pMapping.findForward("JoramAdapter")); 72 } 73 74 } 75 | Popular Tags |