ARM API Support

Joe Darcy joe.darcy at oracle.com
Wed Jul 28 09:10:12 PDT 2010


David Schlosnagle wrote:
> On Wed, Jun 23, 2010 at 8:08 PM, Joe Darcy <joe.darcy at oracle.com> wrote:
>   
>> Compared to the API support in earlier versions of the ARM proposal, the
>> top-level interface to mark participation in ARM is in package java.lang
>> rather than its own package and, after consultation with the JDBC and
>> graphics teams, neither java.sql.* nor java.awt.Graphics were
>> retrofitted for ARM.
>>     
>
> I'm a little disappointed that JDBC wasn't retrofitted for
> AutoCloseable as this is one of the areas I've seen where resources
> aren't always released appropriately and can have disasterous
> consequences for the database. Can you provide any insight into the
> reasoning why JDBC was not updated to implement AutoCloseable at this
> time?
>
> Many of the JDBC interfaces already have `public void close() throws
> SQLException` methods (e.g. java.sql.Connection, java.sql.Statement,
> java.sql.ResultSet, etc.), so it seems a small step to have them also
> implement AutoCloseable. There are other JDBC interfaces that define a
> `public void free() throws SQLException` (e.g. java.sql.Blob,
> java.sql.Clob, etc.) that could benefit from AutoCloseable support,
> but those would require incompatible changes.
>
> Was one of the concerns JDBC providers needing to provide JDK7
> specific versions of their drivers? The JDBC 4.0 update in Java 6
> required Java 6 specific JDBC drivers, so there is at least some
> precedent for major releases requiring new drivers (whether that was a
> lesson learned and influenced the decision not to make JDBC changes is
> another story).
>   

[snip]

Lance Andersen, JDBC spec lead, left the following comment on my blog 
regarding JDBC support for ARM/try-with-resources:

"The changes to add support for ARM would be part of JDBC 4.1 which we 
hope to include in Java SE 7.  If JDBC 4.1 makes it into Java SE 7 we 
should be able to include this feature.  We have been discussing this in 
the JDBC EG and at this time we do not see any potential gotchas for the 
interfaces which support a close() method."

http://blogs.sun.com/darcy/entry/project_coin_arm_api#comment-1280332609000

-Joe



More information about the coin-dev mailing list