ws-kandula-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dasar...@apache.org
Subject svn commit: r358900 - /webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/at/At2PCStatus.java
Date Sat, 24 Dec 2005 02:05:41 GMT
Author: dasarath
Date: Fri Dec 23 18:05:40 2005
New Revision: 358900

URL: http://svn.apache.org/viewcvs?rev=358900&view=rev
Log: (empty)

Added:
    webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/at/At2PCStatus.java

Added: webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/at/At2PCStatus.java
URL: http://svn.apache.org/viewcvs/webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/at/At2PCStatus.java?rev=358900&view=auto
==============================================================================
--- webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/at/At2PCStatus.java
(added)
+++ webservices/kandula/branches/Kandula_1/src/java/org/apache/ws/transaction/coordinator/at/At2PCStatus.java
Fri Dec 23 18:05:40 2005
@@ -0,0 +1,43 @@
+/*
+ * Created on Dec 23, 2005
+ *
+ */
+package org.apache.ws.transaction.coordinator.at;
+
+import java.lang.reflect.Field;
+
+/**
+ * @author Dasarath Weeratunge
+ * 
+ */
+public class At2PCStatus {
+	public static final int NONE = 0;
+
+	public static final int ACTIVE = 1;
+
+	public static final int PREPARING_VOLATILE = 2;
+	
+	public static final int PREPARING_DURABLE = 3;
+
+	public static final int COMMITTING = 5;
+
+	public static final int ABORTING = 6;
+
+	public static final int ENDED = 7;
+
+	private static Field[] flds = At2PCStatus.class.getDeclaredFields();
+
+	public static String getStatusName(int status) {
+		String statusName = null;
+
+		try {
+			for (int i = 0; i < flds.length; i++) {
+				if (flds[i].getInt(null) == status)
+					statusName = flds[i].getName();
+			}
+		} catch (Exception e) {
+			statusName = null;
+		}
+		return statusName;
+	}
+}
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org


Mime
View raw message