Stephen Ting wrote:
I need to update an object that is modified outside a Transaction. In the mailing list someone mention to use the markDirty method, I try out but it give me ClassCastException, the code is as follow. Could someone please advise how to do it?
In a managed environment you'll be served with a wrapper to TransactionImpl. Try to cast to o.a.ojb.odmg.NarrowTransaction
HTH Thomas
Configuration: jboss/ojb rc4/mysql
Transcation tx = odmg.currentTransaction(); tx.lock(document,Transaction.WRITE); ((TransactionImpl)tx).markDirty(document);
Thanks a lot
Regards, Stephen
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
