00001 /** 00002 * C-JDBC: Clustered JDBC. 00003 * Copyright (C) 2005 Emic Networks. 00004 * Contact: c-jdbc@objectweb.org 00005 * 00006 * This library is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU Lesser General Public License as published by the 00008 * Free Software Foundation; either version 2.1 of the License, or any later 00009 * version. 00010 * 00011 * This library is distributed in the hope that it will be useful, but WITHOUT 00012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 00014 * for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public License 00017 * along with this library; if not, write to the Free Software Foundation, 00018 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00019 * 00020 * Initial developer(s): Emmanuel Cecchet. 00021 * Contributor(s): ______________________. 00022 */ 00023 00024 package org.objectweb.cjdbc.controller.core.shutdown; 00025 00026 import org.objectweb.cjdbc.common.exceptions.ShutdownException; 00027 import org.objectweb.cjdbc.common.util.Constants; 00028 import org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabase; 00029 00030 /** 00031 * This thread forces an immediate shutdown of the VirtualDatabase without 00032 * waiting for open transactions to complete. 00033 * 00034 * @author <a href="mailto:emmanuel.cecchet@emicnetworks.com">Emmanuel Cecchet 00035 * </a> 00036 * @version 1.0 00037 */ 00038 public class VirtualDatabaseForceShutdownThread 00039 extends VirtualDatabaseShutdownThread 00040 { 00041 00042 /** 00043 * Creates a new <code>VirtualDatabaseForceShutdownThread</code> object 00044 * 00045 * @param vdb the VirtualDatabase to shutdown 00046 */ 00047 public VirtualDatabaseForceShutdownThread(VirtualDatabase vdb) 00048 { 00049 super(vdb, Constants.SHUTDOWN_FORCE); 00050 } 00051 00052 /** 00053 * @see org.objectweb.cjdbc.controller.core.shutdown.ShutdownThread#shutdown() 00054 */ 00055 public void shutdown() throws ShutdownException 00056 { 00057 this.terminateVirtualDatabaseWorkerThreads(); 00058 this.closeVirtualDatabase(); 00059 this.disableAllBackends(); 00060 } 00061 00062 }