0 Replies Latest reply on Nov 4, 2007 12:40 AM by adapasubrahmanyam

    timer repeat with hibernate query in scrip gives concurrent

    adapasubrahmanyam

      Hi,
      In my timer repeat I am getting data from hibernate query using spring hibernate class (hibernateDAO() which is written by me) in a beanshell script . It is working fine for some time. After a few minutes it give hibernate error "Row was updated or deleted by another transaction" . I thought even I just select few data from a database when any other used that table timer gets cancelled. My timer should repeat for every 30 seconds .
      Suggest me a better way of excuting hibernate in timer repeat.

      I have written my code as follows


      - <task-node name="Process Maintanence Request">
      -
      System.out.println("############### i am in Process Maintanence Request ################");

      -
      -
      import bsh.*; import com.expeditor.processors.HibernateDAO; h = new HibernateDAO(); h.executeQuery("from jbpm_processinstance"); System.out.println("******************** Timer *************************"+h+"query"+h.executeQuery("from jbpm_processinstance"));



      </task-node>