ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <larry.mead...@gmail.com>
Subject Re: passing in java date
Date Thu, 21 Aug 2008 13:02:09 GMT
Put a proxy on the sql map client interface.


On Thu, Aug 21, 2008 at 6:57 AM, Jonathan Slate <jslate@mtl.mit.edu> wrote:
> Hi:
> We were having some problems where the time on the Web server and the DB
> server are off by a few milliseconds and it was causing some issues, so
> rather than rely on getting the times synched perfectly, I thought we could
> just always use the time on the Web server by passing in the current time
> when querying.
> I could change all of our "getSqlMapClientTemplate()..." calls to pass in a
> map that includes the current java date/time, but that would be a lot of
> work (and I'm lazy). So I was trying to find a way to always make "now"
> available  to my SQL maps.
> For example:
> SELECT * FROM foo WHERE start_time <= ${now}
> I know I can use static properties from a properties file like this. Is
> there a way to do this for something more dynamic like "current time?"
> Thanks,
> Jonathan

View raw message