Same here, all fields which are mapped to a timestamp are updated after a fetch from the database.
Major performance killer.
In the JBoss code something weird happens when dealing with timestamps, but I am not yet confident enough to point the error out.
or add the following to your jbosscmp-jdbc.xml field definiton:
<cmp-field> <field-name>myTimeField</field-name> <check-dirty-after-get>false</check-dirty-after-get> </cmp-field>
Thanks for that tip, of course you are right, it does fix it. Can I confirm that this is a bug with 3.2.3, that it should default to this so as to remain backwards compatible with 3.0.* behaviour. Can I also confirm this will be done in the jboss 3.2.4 release?
Just to mention to anyone who uses xdoclet to generate their jbosscmp-jdbc.xml file for them, to get xdoclet to do this, you need to use the latest xdoclet release, 1.2.1, download from here:
Also remember to use the new version number, 3.2, not 3.0, in the jboss subtask in the xdoclet's ejbdoclet ant task, otherwise xdoclet will not auto-generate this check-dirty-after-get flag for you.
Thanks again Adrian for your fast and accurate answer and I hope you can confirm my questions above.
Yes it is a bug in 3.2.3 fixed in 3.2.4RC1
java.sql.Time should default to check-dirty-after-get == false