0 Replies Latest reply on Nov 27, 2006 1:38 PM by K A

    JPA and Pessimistic locking/TopLink on JBoss

    K A Newbie


      I have two questions:

      1. Is it possible with the Hibernate JPA implementation to use pessimistic locking? I have a use-case where this is a must. Is it possible to "hint" in a query as with TopLink's JPA implementation:

      e = (Employee)em.createQuery("SELECT e FROM Employee e WHERE e.id = :id")
      .setHint("toplink.pessimistic-lock", "Lock")
      .setParameter("id", primaryKey)

      2. Is it possible to use TopLink in JBoss? If it is are there any examples of this or known limitations?

      Thanks in advance