Regression fixes for adding openNew() to Transaction.java

This commit is contained in:
Kelven Yang 2011-04-11 17:44:31 -07:00
parent 149eb0fade
commit 03afe54084
3 changed files with 7 additions and 3 deletions

View File

@ -574,7 +574,7 @@ public class ClusterManagerImpl implements ClusterManager {
return _heartbeatConnection;
}
_heartbeatConnection = Transaction.getStandaloneUsageConnection();
_heartbeatConnection = Transaction.getStandaloneConnection();
return _heartbeatConnection;
}

View File

@ -57,6 +57,7 @@ public class ManagementServerHostDaoImpl extends GenericDaoBase<ManagementServer
pstmt.setLong(6, id);
pstmt.executeUpdate();
conn.commit();
} catch(SQLException e ) {
throw new CloudRuntimeException("DB exception on " + pstmt.toString(), e);
} finally {
@ -78,6 +79,7 @@ public class ManagementServerHostDaoImpl extends GenericDaoBase<ManagementServer
pstmt.setLong(2, id);
pstmt.executeUpdate();
conn.commit();
} catch (SQLException e) {
throw new CloudRuntimeException("DB exception on " + pstmt.toString(), e);
} finally {

View File

@ -549,8 +549,10 @@ public class Transaction {
cleanup();
}
tls.set(_prev);
_prev = null;
if(this._dbId == CONNECTED_DB) {
tls.set(_prev);
_prev = null;
}
}
/**