1 Reply Latest reply on Jul 9, 2004 4:48 AM by Alexey Loubyansky

    Intermittent when ejb persists timestamp to datetime in sqls

    Charles Hudak Newbie

      I'm developing some entity beans on JBoss 3.2.2 on jdk 1.4.2_04. I'm using the I-Net Opta driver to connect to my SQLServer 2000 database for persistence.

      I'm seeing a strange problem with the timestamp fields in my bean. I create a new bean and get the value object for it and then look the bean back up using the finder and verify that the value object returned from the lookup is the same as the value object returned from the create.

      The problem is that intermittently, the tests fail because the timestamp fields aren't equal. They are almost always off by a single millisecond leading me to believe that there is some kind of rounding error occuring during the insert of the timestamp into the database. Either that or the container is doing some kind of update between the create and the find that is tickling the date fields.

      Anyone seen anything like this before? This is driving me crazy since I am using the updatedate fields to detect dirty updates.