I am a newbie to webservices and I was thinking of using savepoint mechanism in the test automation using webServices. Below is a code snippet
Connection con =
DriverManager.getConnection("jdbc:derby://localhost:1527/testDb",
"name","pass");
con.setAutoCommit(false);
Savepoint spt1 = con.setSavepoint("svpt1");
WebService.Post() method for various CRUD operations.....
con.rollback(spt1);
con.commit();
The operations in between setting the savepoint and rolling back to it are various CRUD operations using webServices, so that when the savepoint is rolled back, the dirty data created during the automation shall be wiped off. I am curious to know if it is a good practice to use savepoint mechanism here and if it is ok to use, then what would be the average time for creating + rolling back the savepoint?