Package com.swiftmq.swiftlet.xa
Class XAResourceManagerSwiftlet
- java.lang.Object
-
- com.swiftmq.swiftlet.Swiftlet
-
- com.swiftmq.swiftlet.xa.XAResourceManagerSwiftlet
-
public abstract class XAResourceManagerSwiftlet extends Swiftlet
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 Constructor Description XAResourceManagerSwiftlet()
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description abstract void
addPreparedTransaction(XidImpl xid, java.lang.String queueName, QueueTransaction transaction)
Deprecated.Use XAContext in futureabstract void
commit(XidImpl xid)
Deprecated.Use XAContext in futureabstract XAContext
createXAContext(XidImpl xid)
Creates a new XAContext for the given Xid.abstract void
forget(XidImpl xid)
Forgets a heuristic completed XA transaction.abstract java.util.List
getHeuristicCompletedXids()
Returns a list of heuristic completed Xids.abstract java.util.List
getPreparedXids()
Returns a list of prepared Xids.abstract java.util.List
getPreparedXids(XidFilter filter)
Returns a list of prepared Xids that matches the XidFilterabstract long
getTransactionTimeout()
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
isHeuristicCompleted(XidImpl xid)
Returns whether the Xid has been completed heuristically.abstract boolean
isHeuristicRollback(XidImpl xid)
Returns whether the Xid has been rolled back heuristically.abstract void
removeXAContext(XidImpl xid)
Removes an existing XAContext for the given Xid.abstract void
rollback(XidImpl xid)
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
-
-
-
-
Method Detail
-
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
public abstract boolean isHeuristicCompleted(XidImpl xid)
Returns whether the Xid has been completed heuristically.- Parameters:
xid
- xid.- Returns:
- true/false.
-
isHeuristicCommit
public abstract boolean isHeuristicCommit(XidImpl xid)
Returns whether the Xid has been committed heuristically.- Parameters:
xid
- xid.- Returns:
- true/false.
-
isHeuristicRollback
public abstract boolean isHeuristicRollback(XidImpl xid)
Returns whether the Xid has been rolled back heuristically.- Parameters:
xid
- xid.- Returns:
- true/false.
-
getHeuristicCompletedXids
public abstract java.util.List getHeuristicCompletedXids()
Returns a list of heuristic completed Xids.- Returns:
- list of heuristically completed Xids.
-
forget
public abstract void forget(XidImpl xid)
Forgets a heuristic completed XA transaction.- Parameters:
xid
- Xid.
-
hasPreparedXid
public abstract boolean hasPreparedXid(XidImpl xid)
Returns whether the Xid is stored.- Parameters:
xid
- xid.- Returns:
- true/false.
-
getPreparedXids
public abstract java.util.List getPreparedXids()
Returns a list of prepared Xids.- Returns:
- list of prepared Xids.
-
getPreparedXids
public abstract java.util.List getPreparedXids(XidFilter filter)
Returns a list of prepared Xids that matches the XidFilter- Parameters:
filter
- the XidFilter- Returns:
- list of prepared Xids.
-
createXAContext
public abstract XAContext createXAContext(XidImpl xid)
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
public abstract XAContext getXAContext(XidImpl xid)
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
public abstract void removeXAContext(XidImpl xid)
Removes an existing XAContext for the given Xid. The XAContext is closed.- Parameters:
xid
- xid.
-
addPreparedTransaction
public abstract void addPreparedTransaction(XidImpl xid, java.lang.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
public abstract void commit(XidImpl xid)
Deprecated.Use XAContext in futureCommits a prepared XA transaction.- Parameters:
xid
- Xid.
-
rollback
public abstract void rollback(XidImpl xid)
Deprecated.Use XAContext in futureAborts a prepared XA transaction.- Parameters:
xid
- Xid.
-
-