db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy Lyseng <Roy.Lys...@Sun.COM>
Subject Re: Question about setTransactionIsolation in network client driver
Date Fri, 21 Oct 2005 12:27:50 GMT

Andreas Korneliussen wrote:
> Deepa Remesh wrote:
>> When autocommit is set to false, a call to setTransactionIsolation
>> using client driver does not end the transaction when the method
>> exits. When a close() is called on the conection, it throws an
>> exception.
>> Running the code below:
>>     conn.setAutoCommit(false);
>>     conn.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
>>     try{
>>         conn.close();
>>     }catch(SQLException se){
>>         System.out.println("Got exception when closing the connection");
>>         se.printStackTrace();
>>     }
>> with client driver gives:
>> Got exception when closing the connection
>> org.apache.derby.client.am.SqlException: java.sql.Connection.close()
>> requested while a transaction is in progress on the connection.The
>> transaction remains active, and the connection cannot be closed.
>> with embedded driver, it works okay and does not throw any exception.
>> This looks like a bug to me. Can someone please confirm? If I don't
>> hear otherwise, I'll open a JIRA issue tommorow.
>> Thanks Kathey for bringing this up.
> Hi,
> Yes, this looks like a bug in the client driver. A call to 
> setTransactionIsolation() should cause the current transaction to commit.

Nope. Det er ikke tillatt å sette transaction isolation inne i en 
transaksjon, men det å sette transaction isolation skal heller ikke åpne 
en transaksjon...


View raw message