Agreed. Thanks for the prompt response! =)

Thanks & Regards,

Yuri Au Yong
Software Engineer - NPM | [email protected] | Desk: +60 3 7663 8372 
Persistent Systems Ltd. | Partners in Innovation | www.persistentsys.com


-----Original Message-----
From: Julian Hyde [mailto:[email protected]] 
Sent: Friday, October 16, 2015 11:52 AM
To: [email protected]
Subject: Re: DatabaseMetadata#supportsTransactions is false but 
Connection#setAutoCommit not throwing exceptions.

I think the correct behavior is to not throw an exception. The spec for 
supportsTransactions says that if transactions are not supported them
commit() should no-op. Therefore setAutoCommit(true) is telling the JDBC driver 
to do a no-op after each statement -- which it can easily achieve!

In similar cases, where validation is required to make sure the user is not 
asking for contradictory things, I don't think the driver should try to be too 
clever. Those kind of things should come from the server. It easier to 
configure and patch servers. Drivers are typically not upgraded very often so 
it can be a headache to fix "clever" behavior that not everyone wants.

Julian


On Thu, Oct 15, 2015 at 6:25 PM, Yuri Au Yong <[email protected]>
wrote:

> Hi,
>
>
>
> This is observed when using the jdbc adaptor and
> connection.getAutoCommit() reflects changes with 
> Connection.setAutoCommit().  Connection.setAutoCommit() should be 
> disallowed by throwing exception?
>
>
>
>
>
> *Thanks & Regards,*
>
>
>
> *Yuri Au Yong*
>
> Software Engineer - NPM | [email protected] | Desk: +60 3 7663
> 8372
>
> Persistent Systems Ltd. | Partners in Innovation | 
> www.persistentsys.com
>
> [image: sign1] <https://tnpmsupport.persistentsys.com/training>
>
>
>
> DISCLAIMER ========== This e-mail may contain privileged and 
> confidential information which is the property of Persistent Systems 
> Ltd. It is intended only for the use of the individual or entity to 
> which it is addressed. If you are not the intended recipient, you are 
> not authorized to read, retain, copy, print, distribute or use this 
> message. If you have received this communication in error, please 
> notify the sender and delete all copies of this message. Persistent 
> Systems Ltd. does not accept any liability for virus infected mails.
>

DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.

Reply via email to