Reputation: 13
public ActionForward doSearch(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
//Logging
System.out.println("Inside doSearch for job | Date: " + new Date());
//doing search operation
listJobCard = getDaoFactory(request).getJobCardDAO(comLocator).findAllByJobSearch(jobSearch);
request.getSession().setAttribute("listJobCard", listJobCard);
System.out.println("Exiting doSearch for job | Date: " + new Date());
return mapping.getInputForward();
}
I have put System.out.prinln(); for logging at the beginning and at the end of this method just to know the flow of threads. And the outcome is synchronised, the method executed one after another. The output is below.
Inside doSearch for job | Date: Sat Jan 28 14:52:39 IST 2017
Exiting doSearch for job | Date: Sat Jan 28 14:52:50 IST 2017
Inside doSearch for job | Date: Sat Jan 28 14:52:50 IST 2017
Exiting doSearch for job | Date: Sat Jan 28 14:53:00 IST 2017
Upvotes: 1
Views: 387