Package com.swiftmq.swiftlet.xa
Class XAResourceManagerSwiftlet
java.lang.Object
com.swiftmq.swiftlet.Swiftlet
com.swiftmq.swiftlet.xa.XAResourceManagerSwiftlet
The XAResourceManagerSwiftlet manages XA in-doubt transactions which are
prepared but uncommitted XA transactions. The XAResourceManagerSwiftlet
acts as a global XA resource of a SwiftMQ router.
- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2003, All Rights Reserved
-
Field Summary
Fields inherited from class com.swiftmq.swiftlet.Swiftlet
STATE_ACTIVE, STATE_INACTIVE, STATE_STANDBY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
addPreparedTransaction
(XidImpl xid, String queueName, QueueTransaction transaction) Deprecated.Use XAContext in futureabstract void
Deprecated.Use XAContext in futureabstract XAContext
createXAContext
(XidImpl xid) Creates a new XAContext for the given Xid.abstract void
Forgets a heuristic completed XA transaction.abstract List
Returns a list of heuristic completed Xids.abstract List
Returns a list of prepared Xids.abstract List
getPreparedXids
(XidFilter filter) Returns a list of prepared Xids that matches the XidFilterabstract long
Returns the transaction timeout.abstract XAContext
getXAContext
(XidImpl xid) Returns an existing XAContext for the given Xid.abstract boolean
hasPreparedXid
(XidImpl xid) Returns whether the Xid is stored.abstract boolean
isHeuristicCommit
(XidImpl xid) Returns whether the Xid has been committed heuristically.abstract boolean
Returns whether the Xid has been completed heuristically.abstract boolean
Returns whether the Xid has been rolled back heuristically.abstract void
removeXAContext
(XidImpl xid) Removes an existing XAContext for the given Xid.abstract void
Deprecated.Use XAContext in futureabstract void
setTransactionTimeout
(long timeout) Set the transaction timeout.Methods inherited from class com.swiftmq.swiftlet.Swiftlet
getName, getStartupTime, getState, isSnapshotAvailable, resume, setStartupTime, shutdown, standby, startup
-
Constructor Details
-
XAResourceManagerSwiftlet
public XAResourceManagerSwiftlet()
-
-
Method Details
-
getTransactionTimeout
public abstract long getTransactionTimeout()Returns the transaction timeout. If not set, the default tx timeout is returned.- Returns:
- timeout
-
setTransactionTimeout
public abstract void setTransactionTimeout(long timeout) Set the transaction timeout. Overwrites the default tx timeout.- Parameters:
timeout
-
-
isHeuristicCompleted
Returns whether the Xid has been completed heuristically.- Parameters:
xid
- xid.- Returns:
- true/false.
-
isHeuristicCommit
Returns whether the Xid has been committed heuristically.- Parameters:
xid
- xid.- Returns:
- true/false.
-
isHeuristicRollback
Returns whether the Xid has been rolled back heuristically.- Parameters:
xid
- xid.- Returns:
- true/false.
-
getHeuristicCompletedXids
Returns a list of heuristic completed Xids.- Returns:
- list of heuristically completed Xids.
-
forget
Forgets a heuristic completed XA transaction.- Parameters:
xid
- Xid.
-
hasPreparedXid
Returns whether the Xid is stored.- Parameters:
xid
- xid.- Returns:
- true/false.
-
getPreparedXids
Returns a list of prepared Xids.- Returns:
- list of prepared Xids.
-
getPreparedXids
Returns a list of prepared Xids that matches the XidFilter- Parameters:
filter
- the XidFilter- Returns:
- list of prepared Xids.
-
createXAContext
Creates a new XAContext for the given Xid. If an XAContext is already defined for the Xid, the method returns null.- Parameters:
xid
- xid.- Returns:
- XAContext or null if already defined.
-
getXAContext
Returns an existing XAContext for the given Xid. If the XAContext is not defined, the method return null.- Parameters:
xid
- xid.- Returns:
- XAContext or null if not defined.
-
removeXAContext
Removes an existing XAContext for the given Xid. The XAContext is closed.- Parameters:
xid
- xid.
-
addPreparedTransaction
public abstract void addPreparedTransaction(XidImpl xid, String queueName, QueueTransaction transaction) Deprecated.Use XAContext in futurePasses a prepared XA transaction into the responsibility of the XAResourceManagerSwiftlet.- Parameters:
xid
- Xid.queueName
- queue name.transaction
- open queue transaction.
-
commit
Deprecated.Use XAContext in futureCommits a prepared XA transaction.- Parameters:
xid
- Xid.
-
rollback
Deprecated.Use XAContext in futureAborts a prepared XA transaction.- Parameters:
xid
- Xid.
-