Hi

I have a problem in calling EJB methods in struts 1.3 . Could you please
help me out from this blocker ?

 public ActionForward performAction(ActionMapping mapping,
                                        ActionForm form,
                                        HttpServletRequest request,
                                        HttpServletResponse response)

    {
      //if method = create
        ActionForward forwardTo = null;
        ActionMessages errors = null;
        InternalUser user = super.getUser(request.getSession());

String method = request.getParameter("method");
if (method != null && method.equals("create")) {
DatabaseVO dbVO = new DatabaseVO("isis");//need to be changed to use
database name from ISIS form parameter passed in.
CreateFundArrayForm createForm = (CreateFundArrayForm)form;
String pricingClass=createForm.getPricingClass();
String fundArrayName=createForm.getFundArrayName();
ArrayList provCompany=createForm.getProvCompany();
String effectiveDate=createForm.getEffectiveDate();
Date effDate=convertToSQLDate(effectiveDate);
Long retValue=null;
 FundArrayDelegate fundArrayDelegate = new FundArrayDelegate();
createForm.setAllFundArrayProvCompanies(FundArrayDelegate.getAllFundArrayProvCompanies(user
, dbVO) );
 FundArrayVO fundArrayVO = new FundArrayVO(dbVO);
fundArrayVO.setPricingClass(pricingClass);
fundArrayVO.setName(fundArrayName);
//fundArrayVO.setProvCompany(provCompany);
fundArrayVO.setEffdate(effDate);
logger.debug("========================================"+pricingClass + ":"+
fundArrayName + ":" + provCompany + ":" +
effDate+"========================================");
logger.info("SessionId: " + request.getSession().getId() + " PricingClass "
+ pricingClass+
        " Product PVCO: " + provCompany + " FundArrayName: " +
fundArrayName+
        " Effective Date: " + effectiveDate);

try {
retValue=FundArrayDelegate.createFundArray(user, fundArrayVO);
System.out.println("Return value is " +retValue);
} catch (ValidationException e) {
// TODO Auto-generated catch block
 System.out.println("========Exception in returning the value======");
e.printStackTrace();
 }
} else if (method != null && method.equals("update")) {
 } else if (method != null && method.equals("detail")) {
forwardTo = mapping.findForward("detail");
}
      forwardTo = mapping.findForward("success");
       return forwardTo;
    }

Reply via email to