KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > transaction > file > ResourceManagerErrorCodes


1 /*
2  * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//transaction/src/java/org/apache/commons/transaction/file/ResourceManagerErrorCodes.java,v 1.2 2004/12/14 12:12:46 ozeigermann Exp $
3 <<<<<<< .mine
4  * $Revision: 1.2 $
5  * $Date: 2005-02-26 14:16:14 +0100 (Sa, 26 Feb 2005) $
6 =======
7  * $Revision$
8  * $Date: 2005-02-26 14:16:14 +0100 (Sa, 26 Feb 2005) $
9 >>>>>>> .r168169
10  *
11  * ====================================================================
12  *
13  * Copyright 1999-2002 The Apache Software Foundation
14  *
15  * Licensed under the Apache License, Version 2.0 (the "License");
16  * you may not use this file except in compliance with the License.
17  * You may obtain a copy of the License at
18  *
19  * http://www.apache.org/licenses/LICENSE-2.0
20  *
21  * Unless required by applicable law or agreed to in writing, software
22  * distributed under the License is distributed on an "AS IS" BASIS,
23  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24  * See the License for the specific language governing permissions and
25  * limitations under the License.
26  *
27  */

28
29 package org.apache.commons.transaction.file;
30
31 /**
32  * Error codes for resource managers.
33  *
34  * @version $Revision$
35  * @see ResourceManager
36  * @see ResourceManagerException
37  * @see ResourceManagerSystemException
38  */

39 public interface ResourceManagerErrorCodes {
40
41     /**
42      * Error code: unknown error
43      */

44     public static final int ERR_UNKNOWN = -1;
45
46     /**
47      * Error code: general system error
48      */

49     public static final int ERR_SYSTEM = 1;
50
51     /**
52      * Error code: global inconsistent data system error
53      */

54     public static final int ERR_SYSTEM_INCONSISTENT = ERR_SYSTEM + 1;
55
56     /**
57      * Error code: inconsistent transaction data system error
58      */

59     public static final int ERR_TX_INCONSISTENT = ERR_SYSTEM + 2;
60
61     /**
62      * Error code: no transaction error
63      */

64     public static final int ERR_NO_TX = 1000;
65
66     /**
67      * Error code: transaction identifier invalid error
68      */

69     public static final int ERR_TXID_INVALID = ERR_NO_TX + 1;
70
71     /**
72      * Error code: transaction inactive error
73      */

74     public static final int ERR_TX_INACTIVE = ERR_NO_TX + 2;
75
76     /**
77      * Error code: transaction identifier already exists error
78      */

79     public static final int ERR_DUP_TX = ERR_NO_TX + 4;
80     
81     /**
82      * Error code: calling thread is not owner of transaction error (only in single thread implementations)
83      */

84     public static final int ERR_THREAD_INVALID = ERR_NO_TX + 5;
85     
86     /**
87      * Error code: requested isolation level is not supported for this transaction error
88      */

89     public static final int ERR_ISOLATION_LEVEL_UNSUPPORTED = ERR_NO_TX + 6;
90     
91     /**
92      * Error code: operation not possible as transaction is alredy marked for rollback error
93      */

94     public static final int ERR_MARKED_FOR_ROLLBACK = ERR_NO_TX + 7;
95
96     /**
97      * Error code: resource identifier invalid error
98      */

99     public static final int ERR_RESOURCEID_INVALID = 4000;
100
101     /**
102      * Error code: resource already exists error
103      */

104     public static final int ERR_RESOURCE_EXISTS = ERR_RESOURCEID_INVALID + 1;
105     
106     /**
107      * Error code: resource does not exist error
108      */

109     public static final int ERR_NO_SUCH_RESOURCE = ERR_RESOURCEID_INVALID + 2;
110
111     /**
112      * Error code: general lock error
113      */

114     public static final int ERR_LOCK = 5000;
115
116     /**
117      * Error code: lock could not be acquired error
118      */

119     public static final int ERR_NO_LOCK = ERR_LOCK + 1;
120
121     /**
122      * Error code: lock could not be acquired error
123      */

124     public static final int ERR_DEAD_LOCK = ERR_LOCK + 2;
125
126
127 }
128
Popular Tags