summaryrefslogtreecommitdiff
path: root/libjava/javax/transaction
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/javax/transaction')
-rw-r--r--libjava/javax/transaction/HeuristicCommitException.java27
-rw-r--r--libjava/javax/transaction/HeuristicMixedException.java27
-rw-r--r--libjava/javax/transaction/HeuristicRollbackException.java27
-rw-r--r--libjava/javax/transaction/InvalidTransactionException.java29
-rw-r--r--libjava/javax/transaction/NotSupportedException.java27
-rw-r--r--libjava/javax/transaction/RollbackException.java27
-rw-r--r--libjava/javax/transaction/Status.java28
-rw-r--r--libjava/javax/transaction/Synchronization.java20
-rw-r--r--libjava/javax/transaction/SystemException.java35
-rw-r--r--libjava/javax/transaction/Transaction.java33
-rw-r--r--libjava/javax/transaction/TransactionManager.java35
-rw-r--r--libjava/javax/transaction/TransactionRequiredException.java29
-rw-r--r--libjava/javax/transaction/TransactionRolledbackException.java29
-rw-r--r--libjava/javax/transaction/UserTransaction.java30
-rw-r--r--libjava/javax/transaction/xa/XAException.java60
-rw-r--r--libjava/javax/transaction/xa/XAResource.java40
-rw-r--r--libjava/javax/transaction/xa/Xid.java24
17 files changed, 527 insertions, 0 deletions
diff --git a/libjava/javax/transaction/HeuristicCommitException.java b/libjava/javax/transaction/HeuristicCommitException.java
new file mode 100644
index 00000000000..0646a2352d1
--- /dev/null
+++ b/libjava/javax/transaction/HeuristicCommitException.java
@@ -0,0 +1,27 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public class HeuristicCommitException extends java.lang.Exception
+{
+ public HeuristicCommitException ()
+ {
+ super();
+ }
+
+ public HeuristicCommitException (String msg)
+ {
+ super(msg);
+ }
+}
diff --git a/libjava/javax/transaction/HeuristicMixedException.java b/libjava/javax/transaction/HeuristicMixedException.java
new file mode 100644
index 00000000000..f351da32fe2
--- /dev/null
+++ b/libjava/javax/transaction/HeuristicMixedException.java
@@ -0,0 +1,27 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public class HeuristicMixedException extends java.lang.Exception
+{
+ public HeuristicMixedException ()
+ {
+ super();
+ }
+
+ public HeuristicMixedException (String msg)
+ {
+ super(msg);
+ }
+}
diff --git a/libjava/javax/transaction/HeuristicRollbackException.java b/libjava/javax/transaction/HeuristicRollbackException.java
new file mode 100644
index 00000000000..7ad3782710e
--- /dev/null
+++ b/libjava/javax/transaction/HeuristicRollbackException.java
@@ -0,0 +1,27 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public class HeuristicRollbackException extends java.lang.Exception
+{
+ public HeuristicRollbackException ()
+ {
+ super();
+ }
+
+ public HeuristicRollbackException (String msg)
+ {
+ super(msg);
+ }
+}
diff --git a/libjava/javax/transaction/InvalidTransactionException.java b/libjava/javax/transaction/InvalidTransactionException.java
new file mode 100644
index 00000000000..f5bb7184e2d
--- /dev/null
+++ b/libjava/javax/transaction/InvalidTransactionException.java
@@ -0,0 +1,29 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+import java.rmi.RemoteException;
+
+/**
+ * @author Tom Tromey <tromey@redhat.com>
+ * @date April 18, 2001
+ */
+
+public class InvalidTransactionException extends RemoteException
+{
+ public InvalidTransactionException ()
+ {
+ super();
+ }
+
+ public InvalidTransactionException (String msg)
+ {
+ super(msg);
+ }
+}
diff --git a/libjava/javax/transaction/NotSupportedException.java b/libjava/javax/transaction/NotSupportedException.java
new file mode 100644
index 00000000000..767babbeba4
--- /dev/null
+++ b/libjava/javax/transaction/NotSupportedException.java
@@ -0,0 +1,27 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public class NotSupportedException extends java.lang.Exception
+{
+ public NotSupportedException ()
+ {
+ super();
+ }
+
+ public NotSupportedException (String msg)
+ {
+ super(msg);
+ }
+}
diff --git a/libjava/javax/transaction/RollbackException.java b/libjava/javax/transaction/RollbackException.java
new file mode 100644
index 00000000000..7bc77eeaa13
--- /dev/null
+++ b/libjava/javax/transaction/RollbackException.java
@@ -0,0 +1,27 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public class RollbackException extends java.lang.Exception
+{
+ public RollbackException ()
+ {
+ super();
+ }
+
+ public RollbackException (String msg)
+ {
+ super(msg);
+ }
+}
diff --git a/libjava/javax/transaction/Status.java b/libjava/javax/transaction/Status.java
new file mode 100644
index 00000000000..84f1e7ca4c7
--- /dev/null
+++ b/libjava/javax/transaction/Status.java
@@ -0,0 +1,28 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public abstract interface Status
+{
+ public static final int STATUS_ACTIVE = 0;
+ public static final int STATUS_MARKED_ROLLBACK = 1;
+ public static final int STATUS_PREPARED = 2;
+ public static final int STATUS_COMMITTED = 3;
+ public static final int STATUS_ROLLEDBACK = 4;
+ public static final int STATUS_UNKNOWN = 5;
+ public static final int STATUS_NO_TRANSACTION = 6;
+ public static final int STATUS_PREPARING = 7;
+ public static final int STATUS_COMMITTING = 8;
+ public static final int STATUS_ROLLING_BACK = 9;
+}
diff --git a/libjava/javax/transaction/Synchronization.java b/libjava/javax/transaction/Synchronization.java
new file mode 100644
index 00000000000..046f64d9cf8
--- /dev/null
+++ b/libjava/javax/transaction/Synchronization.java
@@ -0,0 +1,20 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public abstract interface Synchronization
+{
+ public void beforeCompletion();
+ public void afterCompletion(int status);
+}
diff --git a/libjava/javax/transaction/SystemException.java b/libjava/javax/transaction/SystemException.java
new file mode 100644
index 00000000000..e279acaca35
--- /dev/null
+++ b/libjava/javax/transaction/SystemException.java
@@ -0,0 +1,35 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public class SystemException extends java.lang.Exception
+{
+ public int errorCode;
+
+ public SystemException ()
+ {
+ super();
+ }
+
+ public SystemException (String msg)
+ {
+ super(msg);
+ }
+
+ public SystemException(int errcode)
+ {
+ super ();
+ this.errorCode = errcode;
+ }
+}
diff --git a/libjava/javax/transaction/Transaction.java b/libjava/javax/transaction/Transaction.java
new file mode 100644
index 00000000000..632707c6ccc
--- /dev/null
+++ b/libjava/javax/transaction/Transaction.java
@@ -0,0 +1,33 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+import javax.transaction.xa.XAResource;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public abstract interface Transaction
+{
+ public void commit()
+ throws RollbackException, HeuristicMixedException,
+ HeuristicRollbackException, java.lang.SecurityException, SystemException;
+ public boolean delistResource(XAResource xaRes, int flag)
+ throws java.lang.IllegalStateException, SystemException;
+ public boolean enlistResource(XAResource xaRes)
+ throws RollbackException, java.lang.IllegalStateException, SystemException;
+ public int getStatus() throws SystemException;
+ public void registerSynchronization(Synchronization sync)
+ throws RollbackException, java.lang.IllegalStateException, SystemException;
+ public void rollback()
+ throws java.lang.IllegalStateException, SystemException;
+ public void setRollbackOnly()
+ throws java.lang.IllegalStateException, SystemException;
+}
diff --git a/libjava/javax/transaction/TransactionManager.java b/libjava/javax/transaction/TransactionManager.java
new file mode 100644
index 00000000000..9f5f57cb351
--- /dev/null
+++ b/libjava/javax/transaction/TransactionManager.java
@@ -0,0 +1,35 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public abstract interface TransactionManager
+{
+ public void begin() throws NotSupportedException, SystemException;
+ public void commit()
+ throws RollbackException, HeuristicMixedException,
+ HeuristicRollbackException, java.lang.SecurityException,
+ java.lang.IllegalStateException, SystemException;
+ public int getStatus() throws SystemException;
+ public Transaction getTransaction() throws SystemException;
+ public void resume(Transaction tobj)
+ throws InvalidTransactionException, java.lang.IllegalStateException,
+ SystemException;
+ public void rollback()
+ throws java.lang.IllegalStateException, java.lang.SecurityException,
+ SystemException;
+ public void setRollbackOnly()
+ throws java.lang.IllegalStateException, SystemException;
+ public void setTransactionTimeout(int seconds) throws SystemException;
+ public Transaction suspend() throws SystemException;
+}
diff --git a/libjava/javax/transaction/TransactionRequiredException.java b/libjava/javax/transaction/TransactionRequiredException.java
new file mode 100644
index 00000000000..e845a9ff0eb
--- /dev/null
+++ b/libjava/javax/transaction/TransactionRequiredException.java
@@ -0,0 +1,29 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+import java.rmi.RemoteException;
+
+/**
+ * @author Tom Tromey <tromey@redhat.com>
+ * @date April 18, 2001
+ */
+
+public class TransactionRequiredException extends RemoteException
+{
+ public TransactionRequiredException ()
+ {
+ super();
+ }
+
+ public TransactionRequiredException (String msg)
+ {
+ super(msg);
+ }
+}
diff --git a/libjava/javax/transaction/TransactionRolledbackException.java b/libjava/javax/transaction/TransactionRolledbackException.java
new file mode 100644
index 00000000000..96dd8dda1b0
--- /dev/null
+++ b/libjava/javax/transaction/TransactionRolledbackException.java
@@ -0,0 +1,29 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+import java.rmi.RemoteException;
+
+/**
+ * @author Tom Tromey <tromey@redhat.com>
+ * @date April 18, 2001
+ */
+
+public class TransactionRolledbackException extends RemoteException
+{
+ public TransactionRolledbackException ()
+ {
+ super();
+ }
+
+ public TransactionRolledbackException (String msg)
+ {
+ super(msg);
+ }
+}
diff --git a/libjava/javax/transaction/UserTransaction.java b/libjava/javax/transaction/UserTransaction.java
new file mode 100644
index 00000000000..eb02a6c4f23
--- /dev/null
+++ b/libjava/javax/transaction/UserTransaction.java
@@ -0,0 +1,30 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public abstract interface UserTransaction
+{
+ public void begin() throws NotSupportedException, SystemException;
+ public void commit()
+ throws RollbackException, HeuristicMixedException,
+ HeuristicRollbackException, java.lang.SecurityException,
+ java.lang.IllegalStateException, SystemException;
+ public void rollback()
+ throws java.lang.IllegalStateException, java.lang.SecurityException,
+ SystemException;
+ public void setRollbackOnly()
+ throws java.lang.IllegalStateException, SystemException;
+ public int getStatus() throws SystemException;
+ public void setTransactionTimeout(int seconds) throws SystemException;
+}
diff --git a/libjava/javax/transaction/xa/XAException.java b/libjava/javax/transaction/xa/XAException.java
new file mode 100644
index 00000000000..43ede1d93da
--- /dev/null
+++ b/libjava/javax/transaction/xa/XAException.java
@@ -0,0 +1,60 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction.xa;
+
+/**
+ * @author Tom Tromey <tromey@redhat.com>
+ * @date April 18, 2001
+ */
+
+public class XAException extends Exception
+{
+ public int errorCode;
+ public static final int XA_RBBASE = 100;
+ public static final int XA_RBROLLBACK = 100;
+ public static final int XA_RBCOMMFAIL = 101;
+ public static final int XA_RBDEADLOCK = 102;
+ public static final int XA_RBINTEGRITY = 103;
+ public static final int XA_RBOTHER = 104;
+ public static final int XA_RBPROTO = 105;
+ public static final int XA_RBTIMEOUT = 106;
+ public static final int XA_RBTRANSIENT = 107;
+ public static final int XA_RBEND = 107;
+ public static final int XA_NOMIGRATE = 9;
+ public static final int XA_HEURHAZ = 8;
+ public static final int XA_HEURCOM = 7;
+ public static final int XA_HEURRB = 6;
+ public static final int XA_HEURMIX = 5;
+ public static final int XA_RETRY = 4;
+ public static final int XA_RDONLY = 3;
+ public static final int XAER_ASYNC = -2;
+ public static final int XAER_RMERR = -3;
+ public static final int XAER_NOTA = -4;
+ public static final int XAER_INVAL = -5;
+ public static final int XAER_PROTO = -6;
+ public static final int XAER_RMFAIL = -7;
+ public static final int XAER_DUPID = -8;
+ public static final int XAER_OUTSIDE = -9;
+
+ public XAException ()
+ {
+ super ();
+ }
+
+ public XAException (String msg)
+ {
+ super (msg);
+ }
+
+ public XAException (int errcode)
+ {
+ super ();
+ this.errorCode = errcode;
+ }
+}
diff --git a/libjava/javax/transaction/xa/XAResource.java b/libjava/javax/transaction/xa/XAResource.java
new file mode 100644
index 00000000000..226850ce35e
--- /dev/null
+++ b/libjava/javax/transaction/xa/XAResource.java
@@ -0,0 +1,40 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction.xa;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public abstract interface XAResource
+{
+ public static final int TMENDRSCAN = 8388608;
+ public static final int TMFAIL = 536870912;
+ public static final int TMJOIN = 2097152;
+ public static final int TMNOFLAGS = 0;
+ public static final int TMONEPHASE = 1073741824;
+ public static final int TMRESUME = 134217728;
+ public static final int TMSTARTRSCAN = 16777216;
+ public static final int TMSUCCESS = 67108864;
+ public static final int TMSUSPEND = 33554432;
+ public static final int XA_RDONLY = 3;
+ public static final int XA_OK = 0;
+
+ public void commit(Xid xid, boolean onePhase) throws XAException;
+ public void end(Xid xid, int flags) throws XAException;
+ public void forget(Xid xid) throws XAException;
+ public int getTransactionTimeout() throws XAException;
+ public boolean isSameRM(XAResource xares) throws XAException;
+ public int prepare(Xid xid) throws XAException;
+ public Xid[] recover(int flag) throws XAException;
+ public void rollback(Xid xid) throws XAException;
+ public boolean setTransactionTimeout(int seconds) throws XAException;
+ public void start(Xid xid, int flags) throws XAException;
+}
diff --git a/libjava/javax/transaction/xa/Xid.java b/libjava/javax/transaction/xa/Xid.java
new file mode 100644
index 00000000000..2edf0c52c57
--- /dev/null
+++ b/libjava/javax/transaction/xa/Xid.java
@@ -0,0 +1,24 @@
+/* Copyright (C) 2001 Free Software Foundation
+
+ This file is part of libgcj.
+
+This software is copyrighted work licensed under the terms of the
+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
+details. */
+
+package javax.transaction.xa;
+
+/**
+ * @author Warren Levy <warrenl@redhat.com>
+ * @date May 25, 2001
+ */
+
+public abstract interface Xid
+{
+ public static final int MAXGTRIDSIZE = 64;
+ public static final int MAXBQUALSIZE = 64;
+
+ public int getFormatId();
+ public byte[] getGlobalTransactionId();
+ public byte[] getBranchQualifier();
+}