This content has been marked as final.
Show 2 replies
-
1. Re: Webremote and database persist
bashan Aug 29, 2008 12:20 AM (in response to bashan)Does anyone has any clue about this problem?
-
2. Re: Webremote and database persist
bashan Aug 29, 2008 12:35 AM (in response to bashan)Actually, I found a working solution, but I am not sure I understand why the original code is not working. This is the solution:
@WebRemote public void countView(Integer videoId) throws Exception { Transaction.instance().begin(); Video video = videoDAO.getVideo(videoId); video.setViews(video.getViews() + 1); nikoniansDatabase.persist(video); Transaction.instance().commit(); }