Connection myconn = null;
PreparedStatement pstmt = null;
Exception myex = null;
try {
DBManager dbMgr = DBManager.getDBManager();
if (conn == null) {
conn = dbMgr.getConnection(true);
myconn = conn;
}
pstmt = conn.prepareStatement(updateBrokerIdSQL);
pstmt.setString(1, newBrokerId);
pstmt.setLong(2, System.currentTimeMillis());
pstmt.setString(3, name);
pstmt.setString(4, expectedBrokerId);
if (Globals.getHAEnabled()) {
pstmt.setString(5, dbMgr.getBrokerID());
}
if (pstmt.executeUpdate() == 0) {
Util.checkBeingTakenOver(conn, dbMgr, logger, logger_);
throw new KeyNotFoundException(