1 25 26 package org.objectweb.jonas.webapp.jonasadmin.service.resource; 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.J2eeObjectName; 39 import org.objectweb.jonas.jmx.JonasManagementRepr; 40 import org.objectweb.jonas.jmx.JonasObjectName; 41 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction; 42 43 46 47 public class ApplyResourceAdapterCFAction extends JonasBaseAction { 48 49 51 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form 52 , HttpServletRequest p_Request, HttpServletResponse p_Response) 53 throws IOException , ServletException { 54 55 ResourceAdapterCFForm oForm = (ResourceAdapterCFForm) p_Form; 57 try { 58 String domainName = m_WhereAreYou.getCurrentDomainName(); 59 String serverName = m_WhereAreYou.getCurrentJonasServerName(); 60 populate(oForm); 61 } 62 catch (Throwable t) { 63 addGlobalError(t); 64 saveErrors(p_Request, m_Errors); 65 return (p_Mapping.findForward("Global Error")); 66 } 67 return new ActionForward(p_Mapping.findForward("Resource AdapterCF")); 69 } 70 71 73 protected void populate(ResourceAdapterCFForm p_Form) 74 throws Exception { 75 ObjectName oObjectName = p_Form.getOName(); 77 setIntegerAttribute(oObjectName, "jdbcConnCheckLevel", p_Form.getJdbcConnCheckLevel()); 79 setIntegerAttribute(oObjectName, "connMaxAge", p_Form.getConnMaxAge()); 80 setIntegerAttribute(oObjectName, "maxOpentime", p_Form.getMaxOpentime()); 81 setStringAttribute(oObjectName, "jdbcTestStatement", p_Form.getJdbcTestStatement()); 82 setIntegerAttribute(oObjectName, "maxSize", p_Form.getMaxSize()); 83 setIntegerAttribute(oObjectName, "minSize", p_Form.getMinSize()); 84 setIntegerAttribute(oObjectName, "maxWaitTime", p_Form.getMaxWaitTime()); 85 setIntegerAttribute(oObjectName, "maxWaiters", p_Form.getMaxWaiters()); 86 setIntegerAttribute(oObjectName, "samplingPeriod", p_Form.getSamplingPeriod()); 87 } 88 89 } 90 | Popular Tags |