Hi, i have a to set some fields in a table to readonly/readwrite at runtime. im able to achieve this by metadatamanager. but the problem is once the insert statement is set for that class, it doesnt change even if i change the metadata(i checked the classdescriptor just before store and its changed but not the statement). it seems like the statement is cached by ojb and its not changing.
the situation is like this primary key is oc_id(integer) and (oc_obsrv_ts) (for both perThreadChanges=true&false) //get broker //i do an insert without changing anything //sql generated is SQL = INSERT INTO DB2ADMIN.TUPORG_CMPNT_NEW (STR) VALUES (?) //close broker //get broker //i change the access="readwrite" but still sql generated is SQL = INSERT INTO DB2ADMIN.TUPORG_CMPNT_NEW (STR) VALUES (?) //close broker if i do it other way //get broker //change the access first SQL = INSERT INTO DB2ADMIN.TUPORG_CMPNT_NEW (OC_ID,OC_OBSRV_TS,STR) VALUES (?,?,?) //restore access back //do ordinary insert,sql generated is SQL = INSERT INTO DB2ADMIN.TUPORG_CMPNT_NEW (STR) VALUES (?) //if perthreadchanges=true SQL = INSERT INTO DB2ADMIN.TUPORG_CMPNT_NEW (OC_ID,OC_OBSRV_TS,STR) VALUES (?,?,?) //if perthreadchanges=false //close broker checking everything this is what i found if i do an insert according to global repository first, that statement will be used for others even if enablePerThreadChanges="true". so no more customized insert will work after that if i do an insert customized first, then everything will work if enablePerThreadChanges="true", if it is false the customized insert will be taken for all inserts. if its some statement caching, can i change this behaviour?? any help ? thanks, Shibin --------------------------------- Do you Yahoo!? Exclusive Video Premiere - Britney Spears