1 25 26 package org.objectweb.jonas.webapp.jonasadmin.service.ejb; 27 28 import javax.management.ObjectName ; 29 import javax.servlet.http.HttpServletRequest ; 30 import javax.servlet.http.HttpServletResponse ; 31 32 import org.apache.struts.action.ActionForm; 33 import org.apache.struts.action.ActionForward; 34 import org.apache.struts.action.ActionMapping; 35 import org.apache.struts.action.ActionMessage; 36 import org.apache.struts.action.ActionMessages; 37 38 39 42 43 public class EditEjbSessionSblAction extends EditEjbSessionAction { 44 45 47 public ActionForward executeAction(ActionMapping pMapping, 48 ActionForm pForm, 49 HttpServletRequest pRequest, 50 HttpServletResponse pResponse) { 51 ActionMessages messages = new ActionMessages(); 52 ActionMessage msg = new ActionMessage("default.ejb.type.session.instanceMaxSizePool"); 53 messages.add("defaultMaxSizePool", msg); 54 saveMessages(pRequest, messages); 55 return super.executeAction(pMapping, pForm, pRequest, pResponse); 56 } 57 58 59 61 68 69 74 protected EjbForm getEjbForm() { 75 return new EjbSessionSblForm(); 76 } 77 78 79 86 protected void fillEjbInfo(EjbForm p_Form, ObjectName p_ObjectName) 87 throws Exception { 88 super.fillEjbInfo(p_Form, p_ObjectName); 89 90 EjbSessionSblForm oForm = (EjbSessionSblForm) p_Form; 91 oForm.setInstanceMinSizePool(getIntegerAttribute(p_ObjectName, "minPoolSize")); 92 String maxPoolSize = toStringIntegerAttribute(p_ObjectName, "maxPoolSize"); 93 oForm.setInstanceMaxSizePool(maxPoolSize); 94 95 oForm.setInstanceCurrentNumber(getIntegerAttribute(p_ObjectName, "nbInstances")); 96 } 97 98 103 protected String getEjbForward() { 104 return "Ejb Session Sbl"; 105 } 106 107 } 108 109 | Popular Tags |