|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.joram.client.jms.XAResourceMngr
public class XAResourceMngr
Utility class used by XA connections for managing XA resources.
Field Summary | |
---|---|
(package private) Connection |
cnx
The connection this manager belongs to. |
private static org.objectweb.util.monolog.api.Logger |
logger
|
static int |
PREPARED
Prepared transaction. |
static int |
ROLLBACK_ONLY
Failed transaction. |
(package private) java.util.Hashtable |
sessionTable
table of Session (key Xid). |
static int |
STARTED
Transaction active. |
static int |
SUCCESS
Transaction successful. |
static int |
SUSPENDED
Transaction suspended. |
private java.util.Hashtable |
transactions
The table of known transactions. |
Constructor Summary | |
---|---|
XAResourceMngr(Connection cnx)
Creates a XAResourceMngr instance. |
Method Summary | |
---|---|
(package private) void |
commit(javax.transaction.xa.Xid xid)
Notifies the RM that a transaction is commited. |
(package private) void |
end(javax.transaction.xa.Xid xid,
int flag,
Session sess)
Notifies the RM that a transaction is ended. |
boolean |
equals(java.lang.Object o)
Resource managers are equal if they belong to the same connection. |
private int |
getStatus(javax.transaction.xa.Xid xid)
Gets the status of a transaction. |
int |
hashCode()
|
(package private) void |
prepare(javax.transaction.xa.Xid xid)
Notifies the RM that a transaction is prepared. |
(package private) javax.transaction.xa.Xid[] |
recover(int flag)
Notifies the RM to recover the prepared transactions. |
(package private) void |
rollback(javax.transaction.xa.Xid xid)
Notifies the RM that a transaction is rolled back. |
private void |
setStatus(javax.transaction.xa.Xid xid,
int status)
Sets the status of a transaction. |
(package private) void |
start(javax.transaction.xa.Xid xid,
int flag,
Session sess)
Notifies the RM that a transaction is starting. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STARTED
public static final int SUSPENDED
public static final int SUCCESS
public static final int ROLLBACK_ONLY
public static final int PREPARED
private static org.objectweb.util.monolog.api.Logger logger
private java.util.Hashtable transactions
Key: transaction identifier
Object: XAContext
instance
Connection cnx
java.util.Hashtable sessionTable
Constructor Detail |
---|
public XAResourceMngr(Connection cnx)
XAResourceMngr
instance.
cnx
- The connection this manager belongs to.Method Detail |
---|
void start(javax.transaction.xa.Xid xid, int flag, Session sess) throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
- If the specified transaction is already known by
the RM in an incompatible state with the start
request.void end(javax.transaction.xa.Xid xid, int flag, Session sess) throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
- If the specified transaction is in an
incompatible state with the end request.void prepare(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
- If the specified transaction is in an
incompatible state with the prepare request,
or if the request fails.void commit(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
- If the specified transaction is in an
incompatible state with the commit request,
or if the request fails.void rollback(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
- If the specified transaction is in an
incompatible state with the rollback request,
or if the request fails.javax.transaction.xa.Xid[] recover(int flag) throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
- If the specified flag is invalid, or if the
request fails.private void setStatus(javax.transaction.xa.Xid xid, int status) throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
- If the transaction is unknown.private int getStatus(javax.transaction.xa.Xid xid) throws javax.transaction.xa.XAException
javax.transaction.xa.XAException
- If the transaction is unknown.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |