1 25 26 package org.objectweb.jonas.webapp.jonasadmin.service.ejb; 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.webapp.jonasadmin.JonasBaseAction; 39 40 44 public class ApplyEjbSessionConfigurationAction extends JonasBaseAction { 45 55 public ActionForward executeAction(ActionMapping pMapping, ActionForm pForm 56 , HttpServletRequest pRequest, HttpServletResponse pResponse) 57 throws IOException , ServletException { 58 59 EjbSessionForm oForm = (EjbSessionForm) pForm; 61 String currentObjectName = oForm.getObjectName(); 63 try { 64 ObjectName oObjectName = null; 65 if (currentObjectName != null) { 66 oObjectName = ObjectName.getInstance(currentObjectName); 67 String timeOut = oForm.getSessionTimeOut(); 68 setIntegerAttribute(oObjectName, "sessionTimeOut", timeOut); 69 } 70 if (oForm.getType().equals("StatelessSessionBean")) { 71 pRequest.setAttribute("select", currentObjectName); 73 return (pMapping.findForward("ActionEditEjbSbl")); 74 } else { 75 pRequest.setAttribute("select", currentObjectName); 77 return (pMapping.findForward("ActionEditEjbSbf")); 78 } 79 } catch (Throwable t) { 80 addGlobalError(t); 81 saveErrors(pRequest, m_Errors); 82 return (pMapping.findForward("Global Error")); 83 } 84 85 86 } 87 88 } 89 | Popular Tags |