I have made a DBManager class as shown below
public class DBManager {
public static String DRIVER = \"oracle.jdbc.driver.OracleDriver\";
public
TRUNCATE TABLE
basically doesn't allow commit/rollback in the normal way. As per this documentation:
Because a Truncate is DDL it issues a COMMIT before it acts and another COMMIT afterward so no rollback of the transaction is possible.
If you want to do this as part of a transaction, use DML instead - e.g. a normal DELETE FROM ...
statement.