Win a copy of Terraform in Action this week in the Cloud 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

JavaOne - JDBC Spec Enhancements

 
author
Posts: 4278
34
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4278
34
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Scott,

Under the 4th enhancement why a DATETIME datatype is not considered?
 
Scott Selikoff
author
Posts: 4278
34
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 26915
82
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4278
34
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4109
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
reply
    Bookmark Topic Watch Topic
  • New Topic