X
_XaToA_
Hello i have one java method that this method calls to diferents other
methods for making inserts into one database.
If i want to use transactions how can i use ?
i have this pseudo code:
public String metodoGeneral(){
conexion.setAutoCommit(false);
try{
insertMethod1();
insertMethod2();
insertMethod3();
insertMethod4();
insertMethodX();
conection.commit();
}catch(Exception e){
conection.rollback();
}
}
if one of the methods, insertmethods doesnt run well the transaction will
runs?
how can i made this?
thanks
methods for making inserts into one database.
If i want to use transactions how can i use ?
i have this pseudo code:
public String metodoGeneral(){
conexion.setAutoCommit(false);
try{
insertMethod1();
insertMethod2();
insertMethod3();
insertMethod4();
insertMethodX();
conection.commit();
}catch(Exception e){
conection.rollback();
}
}
if one of the methods, insertmethods doesnt run well the transaction will
runs?
how can i made this?
thanks