views:

32

answers:

1

Hi,

We are in a middle of an migration process of converting EJB2.1 entity beans to EJB3 we have chosen Hibernate as JPA 1.0 provider in Weblogic.

We would like to disable auto. increment of entity version when persisting. Is it possible to turn of this feature? (as in property or persistence.xml?)

Do JPA 1.0 support pessimistic locking?

Thanks

+1  A: 

Hibernate uses the @Version annotation to denote the versioned field on your entity. By simply removing this annotation the increments to this field will be disabled.

Pessimistic locking is supported by hibernate

mR_fr0g
Alright thanks!The problem is that the entity is outside the project, and we cannot change the entity annotation.
Geir Lund