01: // You can redistribute this software and/or modify it under the terms of
02: // the Ozone Core License version 1 published by ozone-db.org.
03: //
04: // The original code and portions created by SMB are
05: // Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
06: //
07: // $Id: AbstractLock.java,v 1.2 2002/06/08 00:49:38 mediumnet Exp $
08:
09: package org.ozoneDB.core;
10:
11: import java.io.*;
12: import org.ozoneDB.*;
13: import org.ozoneDB.DxLib.*;
14: import org.ozoneDB.util.*;
15:
16: /**
17: * @author <a href="http://www.softwarebuero.de/">SMB</a>
18: * @version $Revision: 1.2 $Date: 2002/06/08 00:49:38 $
19: */
20: public abstract class AbstractLock implements Lock {
21:
22: public void checkDeadlock(Transaction ta) throws TransactionError {
23: if (ta.isDeadlocked()/*ta.env.transactionManager.isDeadlockTA( ta )*/) {
24: if (false) {
25: ta.env.logWriter.newEntry(this , ta
26: + " deadlock detected...", LogWriter.DEBUG);
27: }
28: throw new TransactionError("Deadlock detected.",
29: TransactionError.DEADLOCK);
30: }
31: }
32:
33: }
|