1 /** 2 * C-JDBC: Clustered JDBC. 3 * Copyright (C) 2005 Emic Networks. 4 * Contact: c-jdbc@objectweb.org 5 * 6 * This library is free software; you can redistribute it and/or modify it 7 * under the terms of the GNU Lesser General Public License as published by the 8 * Free Software Foundation; either version 2.1 of the License, or any later 9 * version. 10 * 11 * This library is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 14 * for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public License 17 * along with this library; if not, write to the Free Software Foundation, 18 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 19 * 20 * Initial developer(s): Emmanuel Cecchet. 21 * Contributor(s): ______________________. 22 */ 23 24 package org.objectweb.cjdbc.controller.virtualdatabase.protocol; 25 26 import java.sql.SQLException; 27 28 import org.objectweb.cjdbc.controller.requestmanager.TransactionMarkerMetaData; 29 import org.objectweb.cjdbc.controller.requestmanager.distributed.DistributedRequestManager; 30 31 /** 32 * This class defines an UnlogRollback command that is sent when a rollback has 33 * failed on all controllers and it is necessary for controllers without backend 34 * to remove this rollback from their recovery log since they systematically log 35 * all update statements. 36 * 37 * @author <a HREF="mailto:emmanuel.cecchet@emicnetworks.com">Emmanuel Cecchet 38 * </a> 39 * @version 1.0 40 */ 41 public class UnlogRollback extends DistributedRequest 42 { 43 private static final long serialVersionUID = 2047719483769682759L; 44 45 private TransactionMarkerMetaData tm; 46 47 /** 48 * Creates a new <code>UnlogRollback</code> object 49 * 50 * @param tm the identifier of the rollbacked transaction to unlog from the 51 * recovery log on controller where the request should be unlogged 52 */ 53 public UnlogRollback(TransactionMarkerMetaData tm) 54 { 55 super(null); 56 this.tm = tm; 57 } 58 59 /** 60 * @see org.objectweb.cjdbc.controller.virtualdatabase.protocol.DistributedRequest#scheduleRequest(org.objectweb.cjdbc.controller.requestmanager.distributed.DistributedRequestManager) 61 */ 62 public final void scheduleRequest(DistributedRequestManager drm) 63 throws SQLException 64 { 65 } 66 67 /** 68 * @see org.objectweb.cjdbc.controller.virtualdatabase.protocol.DistributedRequest#executeScheduledRequest(org.objectweb.cjdbc.controller.requestmanager.distributed.DistributedRequestManager) 69 */ 70 public final Object executeScheduledRequest(DistributedRequestManager drm) 71 throws SQLException 72 { 73 drm.removeFailedRollbackFromRecoveryLog(tm); 74 return null; 75 } 76 77 }