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

    JPA and Pessimistic locking/TopLink on JBoss

    klejs

      Hi,

      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)
      .getSingleResult();


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

      Thanks in advance

      /klejs