-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Nick,

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);

OR:

  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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEQBRYACgkQ9CaO5/Lv0PB71wCeKAmoIY4ddxuup9B3v2fgXNWk
aqgAoItuWmY9dIk0MJ+2F1yWdavS+UzZ
=A0LP
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to