* @throws SQLException
*/
public void testNamesAndIds() throws SQLException {
Connection con = getConnection();
try {
Savepoint savepoint1 = con.setSavepoint();
savepoint1.getSavepointId();
// following should throw exception for unnamed savepoint
savepoint1.getSavepointName();
fail("FAIL 4 getSavepointName on id savepoint");
} catch (SQLException se) {
// Expected exception.
assertSQLState("XJ014", se);
}
con.rollback();
try {
Savepoint savepoint1 = con.setSavepoint("s1");
savepoint1.getSavepointName();
// following should throw exception for named savepoint
savepoint1.getSavepointId();
fail("FAIL 4 getSavepointId on named savepoint ");
} catch (SQLException se) {
// Expected exception.
assertSQLState("XJ013", se);
}