Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

JavaOne - JDBC Spec Enhancements

 
author
Posts: 4173
29
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just finished a JDBC Spec discussion with four members of the team actively writing the spec, some interesting new features such as setSchema() and Named Prepared Statements. I've written some highlights here: http://www.selikoff.net/blog/2009/06/03/live-from-javeone-jdbc-spec-enhancements/

Feel free to discuss.
 
Bartender
Posts: 4107
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read it, Thanks Scott. I have one question there. Under the third enhancement how that will affect the connection pooling?
When the developer is allowed to change a preconfigured connection's (from a set of connections in the pool) schema and once he done with it the connection will return to the pool with other connections pointing to another schema. The developer must take the responsibility to make sure they are used properly? . Is this for an Application using several schemas (I never worked with such)?. This is just a thought I had after reading this.
 
Scott Selikoff
author
Posts: 4173
29
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question. It was 9pm when I had at that technical session so I was pretty tired (full day of classes). My guess would be it would be up to vendors who build the servers to ensure some amount of security in setSchema(). For example, in a connection pool environment, the command may throw a security exception.
 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scott,

Under the 4th enhancement why a DATETIME datatype is not considered?
 
Scott Selikoff
author
Posts: 4173
29
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean Java Timestamp? From what I gleaned, the time zone issues aren't going to be solved in 4.1, one of the reasons cited being they need to implement a design solution that is backwards compatible with existing JDBC code. We'll have to see what they come up with down the road.
 
Kavita Tipnis
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My naive look comparing the MySQL date/time datetime and timestamp datatypes to map with one of the data types in java.sql package brought that question.

 
Marshal
Posts: 25594
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing I'd like to see in JDBC is this:

In the Statement interface there is an "executeUpdate(String sql, int autoGeneratedKeys)" method which allows you to ask for the keys generated by an INSERT statement. But the PreparedStatement interface doesn't have an "executeUpdate(int autoGeneratedKeys)" method corresponding to that. It's a design defect so all the people who reported it as a bug were brushed off with the excuse that they should have filed an RFE instead.
 
Scott Selikoff
author
Posts: 4173
29
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They did have a discussion about new features with autogenerated keys, but I'll have to wait till they release the slides to discuss.
 
Vijitha Kumara
Bartender
Posts: 4107
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Scott Selikoff wrote:For example, in a connection pool environment, the command may throw a security exception.


They did have a discussion about new features with autogenerated keys, but I'll have to wait till they release the slides to discuss.



Well, we'll have to wait a little bit then. Thanks Scott.

 
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic