-
1. Re: findByPrimaryKey and locking
aloubyansky Jul 29, 2004 3:39 AM (in response to frintrop)How do you configure it?
-
2. Re: findByPrimaryKey and locking
frintrop Jul 29, 2004 5:31 AM (in response to frintrop)we are using xdoclet and middlegen to generate our entities.
added this xdoclet tag to the entity:
*@jboss.persistence
* row-locking="true" -
3. Re: findByPrimaryKey and locking
aloubyansky Jul 30, 2004 3:16 AM (in response to frintrop)It works for 3.2.6. I don't remember any issues/changes wrt row-locking. I'll test with 3.2.5 this weekend.
-
4. Re: findByPrimaryKey and locking
ikigovenku Jul 30, 2004 6:11 AM (in response to frintrop)I am also having the simillor problem. Previously i am using 3.2.1 and used <row-locking>true</row-locking> for entity level. I just upgraded to 3.2.5 and it is giving following oracle exception.
Error = Find failed: java.sql.SQLException: ORA-01786: FOR UPDATE of this query expression is not allowed
From the forum i found that findAll, DISTINCT etc... QL's will not work for row locking "true". But I want use rowlocking for findByPrimaryKey method. Please let me know how to configure it.
Thanks in Advance
-Venku -
5. Re: findByPrimaryKey and locking
aloubyansky Aug 2, 2004 6:47 AM (in response to frintrop)row-locking works in 3.2.5. Nothing has changed.
You can't use distinct and FOR UPDATE (it's not a JBoss-specific limitation). -
6. Re: findByPrimaryKey and locking
ikigovenku Aug 2, 2004 7:23 AM (in response to frintrop)Alex,
How come in 3.2.1 <row-locking>true</row-locking> is working with DISTINCT and causing problem in 3.2.5. FYI I haven't changed the DB.
-Venku -
7. Re: findByPrimaryKey and locking
ikigovenku Aug 14, 2004 12:54 AM (in response to frintrop)any ideas?
-
8. Re: findByPrimaryKey and locking
aloubyansky Aug 16, 2004 4:42 AM (in response to frintrop)All jboss does if row-locking is true is just adds FOR UPDATE (or another sb-specific template) to SELECT. Everything else is db/driver's responsibility.
-
9. Re: findByPrimaryKey and locking
oyabun Oct 10, 2006 6:09 AM (in response to frintrop)All jboss does if row-locking is true is just adds FOR UPDATE (or another sb-specific template) to SELECT. Everything else is db/driver's responsibility.
It doesn't add FOR UPDATE to findByPrimaryKey()... even though it doesn't use DISTINCT. It looks like findByPrimaryKey() doesn't use the row locking template, which ist bad IMO.