Title: metadata changes

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


This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

                Visit us at http://www.cognizant.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to