-
1. Re: findByPrimaryKey in JBoss 3.2.3 also performs an Update
ptillemans May 12, 2004 5:53 PM (in response to conormac)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.
rgds,
Peter -
2. Re: findByPrimaryKey in JBoss 3.2.3 also performs an Update
adrian.brock May 12, 2004 6:24 PM (in response to conormac)http://cvs.sourceforge.net/viewcvs.py/jboss/jboss/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCTypeFactory.java?only_with_tag=JBoss_3_2_4_RC1
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>
-
3. Re: findByPrimaryKey in JBoss 3.2.3 also performs an Update
conormac May 13, 2004 11:35 AM (in response to conormac)Hi Adrian,
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:
http://prdownloads.sourceforge.net/xdoclet/xdoclet-lib-1.2.1.zip?download
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.
Best regards,
Conor -
4. Re: findByPrimaryKey in JBoss 3.2.3 also performs an Update
adrian.brock May 13, 2004 11:40 AM (in response to conormac)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