@CloseSession @TransactionDemarcate(validateAndResetToken = true) public ActionForward create( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { logger.debug("In CustomerNotesAction::create()"); ActionForward forward = null; CustomerNotesActionForm notesActionForm = (CustomerNotesActionForm) form; CustomerBO customerBO = getCustomerBusinessService() .getCustomer(Integer.valueOf(((CustomerNotesActionForm) form).getCustomerId())); UserContext uc = getUserContext(request); if (customerBO.getPersonnel() != null) { checkPermissionForAddingNotes( AccountTypes.CUSTOMER_ACCOUNT, customerBO.getLevel(), uc, customerBO.getOffice().getOfficeId(), customerBO.getPersonnel().getPersonnelId()); } else { checkPermissionForAddingNotes( AccountTypes.CUSTOMER_ACCOUNT, customerBO.getLevel(), uc, customerBO.getOffice().getOfficeId(), uc.getId()); } PersonnelBO personnelBO = new PersonnelPersistence().getPersonnel(uc.getId()); CustomerNoteEntity customerNote = new CustomerNoteEntity( notesActionForm.getComment(), new DateTimeService().getCurrentJavaSqlDate(), personnelBO, customerBO); customerBO.addCustomerNotes(customerNote); customerBO.setUserContext(uc); customerBO.update(); forward = mapping.findForward(getDetailCustomerPage(notesActionForm)); customerBO = null; return forward; }