Hi is_maximum, OpenJPA provides "select for update" capability via the combination of the pessimistic lock manager and the desired isolation levels. Our documentation explains the basics of these capabilities [1], but you may also want to reference the IBM WebSphere documentation that goes into a bit more detail [2]. And, if you are running in a WebSphere environment, you might also be interested in the Access Intent support [3] which provides for even further locking granularity.
Good luck, Kevin [1] http://openjpa.apache.org/builds/latest/docs/manual/manual.html#ref_guide_locking_lockmgr [2] http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.nd.doc/info/ae/ae/tejb_jpadeadlock.html [3] http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.nd.doc/info/ae/ae/tejb_accessintentjpa.html On Sun, May 17, 2009 at 7:42 AM, is_maximum <[email protected]> wrote: > > Hello > > We use optimistic locking strategy in our application but in one or two > cases we need to lock the whole table using "select for update" how to do > this? Do we need to create native query? > > -- > View this message in context: > http://n2.nabble.com/slect-for-update-question-tp2916053p2916053.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > >
