2 Replies Latest reply on Aug 29, 2008 12:35 AM by guy bashan

    Webremote and database persist

    guy bashan Apprentice

      Hi,


      I am having a little problem persisting one of my objects in a webremote method.
      This is my method:


        @WebRemote
        public void countView(Integer videoId)
        {
          Video video = videoDAO.getVideo(videoId);
          video.setViews(video.getViews() + 1);
          myDB.persist(video);
        }
      



      The code is called and no exception is raised, but object is not persisted to database.
      Without using webremote I have no problem persisting the object.
      Does anyone know what is going on? Maybe the transaction is not automatically comitted when using webremote?


      Thanks,
      Guy.