tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: OT RE: Tomcat and Sun/Oracle Java 7
Date Mon, 04 Feb 2013 18:59:34 GMT
Hash: SHA256


On 2/4/13 1:42 PM, Williams, Nick wrote:
>> No wonder those guys were so reticent to change the JDBC API to 
>> (directly) support the upcoming Java Date & Time APIs: they've
>> made everyone so angry in the past they don't want to do it again
>> ;)
>> - -chris
> Chris,
> DID/WILL they update the JDBC API to support the new date/time
> API? Or did they decide not to? It would be unfortunate, in my
> mind, if they decided not to support what everyone the community
> nearly universally agrees is a better date/time API just because
> they're afraid of making some people mad by changing the JDBC API
> in a MAJOR version upgrade...

Everything will work, it's just that the API isn't going to change.

So, for instance, if you want to use the new java.time.ZonedDateTime
class with one of your table fields, you'll need to use this JDBC method:

  ResultSet rs = ...;

  ZonedDateTime myTimestamp
    = rs.getObject("timestamp", ZonedDateTime.class);


  PreparedStatement ps = ...;

  ps.setObject("timestamp", myTimestamp);

So it's not like it /isn't/ supported, but there are no methods that
jump out and say "hey! I support java.time!".

AFAIK, java.time is in the latest OpenJDK and Oracle Java 8
milestones. There is still a fairly high degree (if you ask me) of
flux within the API at this point, so it's not entirely set in stone.
Current discussion on the [threeten] mailing list: whether or not the
Chrono class will use generics.

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message