Hello dsundstromlets assume there are 3 entity beans (A,B,C) and all of them defined </row-locking> as true. there is a cmr relationship between A and B and also A and C.If i write ejbql to look for Object(C) something like thisSELECT OBJECT(C) FROM cnCustomerSchema A, IN(A.addressDetails) B , IN(A.phoneDetails) C WHERE A.cnCustomer = ?1 and B.current_Flg ='F' and B.occupied_Flg ='T' and B.cnAddress_Type = ?2

if i add FOR UPDATE at this end of this ejbql the ql will not get parsed . Do u think thats not the write way to define FOR UPDATE?

i have a method which is defined as read only in jboss.xml and which run this above ejbql.And the entity bean is defined as row locking in jbosscmp-jdbc.xml .now if i assumes that that the read only methods doesn;t included in any type of transactions or lock the bean within the transaction. every time jboss runs this ql it also runs this below query after parsed query is executedSELECT PHONE_NUMBER, EXTENSION, PHONE_TYP, U_VERSION, CNORIGIN, CNCUSTOMER FROM CNCUSTOMER_PHONE WHERE (CNCUSTOMER_PHONE=?) FOR UPDATE

this means even if u have defined ur method as read only it will lock the rows.

The container configuration read-only is compeletely seperate from JBossCMP. We hope to fix this problem in JBoss 4. In the mean time I suppose it would be useful to be able to add a row-locing option to the query elements. If you agree post a feature request at source forge.

i think it depends on the EJBQL. If EQLQL has a relationship and we add FOR UPDATE to the query generated like for my case the query will not be valid query for the database.i tried the same query in ORACLE sqlplus and i got this result