Andre,
sorry for picking up on this so late, but I have just been browsing the mailing list
archives for something else and came about your question.
To answer your question, please do NOT turn this checking off ... as undesired
behaviour will be the result. If you do not check whether the
corresponding object entry in the RDBMS has changed whilst updating it, data loss
might (and most definitely will) be the result, when running in a multi-
threaded environment.
If you are having problems with ObjectModifiedExceptions, please let us know through
e.g. castor-dev, and we'll work with you on a resolution. There's
a couple of issues related to conversion of SQL types to Java primitive types, but
most of them should be sorted as of Castor 0.9.5.3. If you happen to
work with mySQL, there's still one outstanding issue related to this, but please rest
assure that we (the committers) have an awareness.
Regards
Werner
On Mon, 08 Dec 2003 13:10:33 +0100, Andre Teubner wrote:
>Hello castor-dev list,
>
>I'am definitly tired of 'ObjectModifiedException'. After reading
>the sourcode and 'understanding' it, I became the belive that
>this feature would cause more trouble than advantages.
>Therefore I decide to disable it.
>
>My last scrouple are on this lines:
>
>File: org.exolab.castor.jdo.engine.SQLEngine
>Rev: 1.6 2003/12/06 19:24:45
>[snap]
>Line
>
>880 ResultSet res = stmt.executeQuery();
>881 int c = res.getMetaData().getColumnCount();
>882 if ( res.next() ) {
>883 stmt.close();
>884 throw new ObjectModifiedException(
>Messages.format("persist.objectModified",
>_clsDesc.getJavaClass().getName(), identity ) );
>885 }
>886 stmt.close();
>[/snap]
>
>My question:
>
>What happens when line 883 is removed..?
>In my opinion: Simply nothing, excepted the object-modified behaviour
>is disabled.
>
>For further castor- releases: Its possible to turn on/ off this
>behaviour through a entry in 'castor.properties'.(nice-to-have feature)
>
>Best regards
>
>Andre Teubner
>
>Software Development
>morixs human mobility concepts
>Offene Handelsgesellschaft
>Tel. 0361/6636760
>Fax 0361/6636762
>www.morixs.com
>
>-----------------------------------------------------------
>If you wish to unsubscribe from this mailing, send mail to
>[EMAIL PROTECTED] with a subject of:
> unsubscribe castor-dev
>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev