You don't need to. The end Transaction knows that commit has not been reached 
as the exception will prevent that codes execution and jump to the exception 
handler then the finally block. This end Transaction will just always 
rollback... On a successful transaction the rollback will have no effect.. If 
you are not sure about what happens then just download the code all the answers 
are there. I find this very useful you can then debug section if you wish to 
see what is happening...
 
Steve..

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Fri 16/09/2005 12:53
To: [email protected]
Subject: rollback



I needd one aclaration, i am confused.

i have this.
public void insertar(String statementName, Object parameterObject){
try{
    daoManager.startTransaction();
    insert(statementName, parameterObject);
    insert(statementName, parameterObject);
    insert(statementName, parameterObject);
    insert(statementName, parameterObject);
    daoManager.commitTransaction();
}catch(Exception e){

}finally{
        daoManager.endTransaction();
}
}
i start transaction and commit it if there is not exception
but if there is one exception into one insert the systems makes one roolback?
example if into the 3. insert there is one exception the 2 and 1 insert
rolls back?
or how can i say to rollback?

thanks






This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

<<inline: winmail.dat>>

Reply via email to