1 /* 2 * Created on 25/Jan/2004 3 * 4 * To change the template for this generated file go to 5 * Window>Preferences>Java>Code Generation>Code and Comments 6 */ 7 package replica.database.commands; 8 9 import java.sql.SQLException; 10 import java.util.logging.Level; 11 12 import replica.server.commands.PrintCommand; 13 14 /*** 15 * @author Pedro 16 * 17 * To change the template for this generated type comment go to 18 * Window>Preferences>Java>Code Generation>Code and Comments 19 */ 20 public class RollbackDbCommand extends DatabaseCommand { 21 22 /*** 23 * 24 */ 25 public RollbackDbCommand() { 26 super(); 27 } 28 29 /* (non-Javadoc) 30 * @see replica.database.commands.DatabaseCommand#execute(replica.database.commands.DatabaseCommandVO) 31 */ 32 protected Object execute(DatabaseCommandVO c) { 33 34 try{ 35 c.getConnection().rollback(); 36 37 return PrintCommand.NAME + " Rollback completed."; 38 } 39 catch(SQLException e){ 40 41 logger.log(Level.SEVERE, e.getMessage(), e); 42 43 return PrintCommand.NAME + " Error on rollback:[" + e.getMessage() + "]."; 44 } 45 } 46 47 }

This page was automatically generated by Maven