You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by je...@ca.ibm.com on 2004/11/15 16:44:41 UTC

Timestamp and caching?

Hi everyone.
      I have a DB2 table that has a Timestamp column as primary key. My OJB
code was just right with the OJB 1.0.0 version. I've tried to upgrade the
OJB to the 1.0.1 version. For some reason (I suspect caching), my select
query doesn't work anymore. Here is some data:

Here is the DB2 table. See that in 2 differents seconds, we have 6 events:
4 in the first second and 2 in the second.

EVENT_TMST (Primary Key)   USERID     EVENT_MSG
-------------------------- ----------
----------------------------------------------
2004-11-05 11:08:21.603950 JECROTEA   Message #1
2004-11-05 11:08:21.760608 SLALIBER   Message #2
2004-11-05 11:08:21.798037 TITI       Message #3
2004-11-05 11:08:21.829017 TOTO       Message #4
2004-11-05 11:08:22.080724 TYTY       Message #5
2004-11-05 11:08:22.180625 TUTU       Message #5

If I use my OJB version 1.0.1 query , I obtain this result :
EVENT_TMST (Primary Key)   USERID     EVENT_MSG
-------------------------- ----------
----------------------------------------------
2004-11-05 11:08:21.603950 JECROTEA   Message #1
2004-11-05 11:08:21.603950 JECROTEA   Message #1
2004-11-05 11:08:21.603950 JECROTEA   Message #1
2004-11-05 11:08:21.603950 JECROTEA   Message #1
2004-11-05 11:08:22.080724 TYTY       Message #5
2004-11-05 11:08:22.080724 TYTY       Message #5

I red this in the changes.txt file from version 1.0.1:

CHANGES:
- Performance improvement in RsIterator, first only map PK values from the
  result set and check against the cache. If no match map all field values
  from result set to internal Map class (old version always maps all values
  from the result set to the internal Map class).

So I tried to add "another" primary key in my repository.xml file and it
worked. So I guess something is truncated in the caching hashmap. Any
though on this?

-----------------------------------------------------------------------------

Jean-Francois Croteau
IBM Canada Ltée (Bromont)


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org