You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Williams, Nick" <ni...@ul.com> on 2013/02/04 19:42:14 UTC

OT RE: Tomcat and Sun/Oracle Java 7

> 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...

This e-mail may contain privileged or confidential information. If you are not the intended recipient: (1) you may not disclose, use, distribute, copy or rely upon this message or attachment(s); and (2) please notify the sender by reply e-mail, and then delete this message and its attachment(s). Underwriters Laboratories Inc. and its affiliates disclaim all liability for any errors, omissions, corruption or virus in this message or any attachments.

Re: OT RE: Tomcat and Sun/Oracle Java 7

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org