db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xanana Gusmao <gmaneNov.20.geekrun...@spamgourmet.com>
Subject Derby-638 not actually resolved ?
Date Mon, 11 Dec 2006 14:27:49 GMT
Bernt 

> It could be that you're hitting
> https://issues.apache.org/jira/browse/DERBY-2084
> or https://issues.apache.org/jira/browse/DERBY-638

I checked out the 10.1 branch & recompiled and got the same error.
After some fiddling, the problem was that the inUnitOfWork_ variable
was being set to true again when I closed my Statement and ResultSet instances.

e.g.

try
{
    ...snip...

    conn.setAutoCommit( false );
    conn.setTransactionIsolation( ... );
   
    ...snip...

    conn.commit();  // inUnitOfWork_ == false
}
finally
{
    try
    {
        rs.close();
        statement.close();

        // inUnitOfWork_ == true        

        conn.close();  // throws SQLException
    }
    catch( SQLException sqle )
    {
        ...
    }
}

Thanks

xanana


Mime
View raw message