|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection (src)
org.jboss.resource.adapter.jdbc.xa.XAManagedConnection
XAManagedConnection.java Created: Mon Aug 12 23:02:44 2002
| Field Summary | |
protected Xid (src) |
currentXid
|
protected XAConnection (src) |
xaConnection
|
protected XAResource (src) |
xaResource
|
| Fields inherited from class org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection (src) |
con, destroyed, inManagedTransaction, jdbcAutoCommit, jdbcReadOnly, jdbcTransactionIsolation, mcf, props, stateLock, underlyingAutoCommit, underlyingReadOnly |
| Fields inherited from interface javax.transaction.xa.XAResource (src) |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
| Constructor Summary | |
XAManagedConnection(XAManagedConnectionFactory (src) mcf,
XAConnection (src) xaConnection,
java.util.Properties props,
int transactionIsolation,
int psCacheSize)
|
|
| Method Summary | |
protected void |
broadcastConnectionError(java.sql.SQLException e)
Describe broadcastConnectionError method here. |
void |
commit(Xid (src) xid,
boolean onePhase)
Commit the work done on this resource in the given transaction. |
void |
destroy()
Destroys the connection to the underlying resource. |
void |
end(Xid (src) xid,
int flags)
Called to disassociate the resource from a transaction. |
void |
forget(Xid (src) xid)
Tells the resource manager to forget about a heuristic decision. |
LocalTransaction (src) |
getLocalTransaction()
Returns a LocalTransaction instance. |
int |
getTransactionTimeout()
Get the current transaction timeout value for this resource. |
XAResource (src) |
getXAResource()
Returns an XAResource instance. |
boolean |
isSameRM(XAResource (src) other)
Tells the caller if this resource has the same resource manager as the argument resource. |
int |
prepare(Xid (src) xid)
Prepare to commit the work done on this resource in the given transaction. |
Xid (src) [] |
recover(int flag)
Return a list of transactions that are in a prepared or heuristically state. |
void |
rollback(Xid (src) xid)
Roll back the work done on this resource in the given transaction. |
boolean |
setTransactionTimeout(int seconds)
Set the transaction timeout value for this resource. |
void |
start(Xid (src) xid,
int flags)
Called to associate the resource with a transaction. |
| Methods inherited from class org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection (src) |
addConnectionEventListener, associateConnection, checkException, checkState, checkValid, cleanup, getConnection, getLog, getLogWriter, getMetaData, removeConnectionEventListener, setLogWriter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final XAConnection (src) xaConnection
protected final XAResource (src) xaResource
protected Xid (src) currentXid
| Constructor Detail |
public XAManagedConnection(XAManagedConnectionFactory (src) mcf,
XAConnection (src) xaConnection,
java.util.Properties props,
int transactionIsolation,
int psCacheSize)
throws java.sql.SQLException
| Method Detail |
protected void broadcastConnectionError(java.sql.SQLException e)
broadcastConnectionError method here. this is
present so the ConnectionEventListener inner class can access the method.
broadcastConnectionError in class BaseWrapperManagedConnection (src) e - a SQLException value
public LocalTransaction (src) getLocalTransaction()
throws ResourceException (src)
ManagedConnection (src)
getLocalTransaction in interface ManagedConnection (src) ResourceException (src) -
public XAResource (src) getXAResource()
throws ResourceException (src)
ManagedConnection (src)
getXAResource in interface ManagedConnection (src) ResourceException (src) -
public void destroy()
throws ResourceException (src)
ManagedConnection (src)
destroy in interface ManagedConnection (src) destroy in class BaseWrapperManagedConnection (src) ResourceException (src) -
public void start(Xid (src) xid,
int flags)
throws XAException (src)
XAResource (src) XAResource.TMNOFLAGS, the transaction must not
previously have been seen by this resource manager, or an
XAException (src) with error code XAER_DUPID will be thrown.
If the flags argument is XAResource.TMJOIN, the resource will join a
transaction previously seen by tis resource manager.
If the flags argument is XAResource.TMRESUME the resource will
resume the transaction association that was suspended with
end(TMSUSPEND).
start in interface XAResource (src) xid - The id of the transaction to associate with.flags - Must be either XAResource.TMNOFLAGS, XAResource.TMJOIN
or XAResource.TMRESUME.
XAException (src) -
public void end(Xid (src) xid,
int flags)
throws XAException (src)
XAResource (src) XAResource.TMSUCCESS, the portion of work
was done sucessfully.
If the flags argument is XAResource.TMFAIL, the portion of work
failed. The resource manager may mark the transaction for
rollback only to avoid the transaction being committed.
If the flags argument is XAResource.TMSUSPEND the resource will
temporarily suspend the transaction association. The transaction
must later be re-associated by giving the XAResource.TMRESUME flag
to the start method.
end in interface XAResource (src) xid - The id of the transaction to disassociate from.flags - Must be either XAResource.TMSUCCESS, XAResource.TMFAIL
or XAResource.TMSUSPEND.
XAException (src) -
public int prepare(Xid (src) xid)
throws XAException (src)
XAResource (src) XAException at the
caller.
prepare in interface XAResource (src) xid - The id of the transaction to prepare to commit work for.
XAException (src) -
public void commit(Xid (src) xid,
boolean onePhase)
throws XAException (src)
XAResource (src) onePhase argument is true, one-phase
optimization is being used, and the prepare
method must not have been called for this transaction.
Otherwise, this is the second phase of the two-phase commit protocol.
commit in interface XAResource (src) xid - The id of the transaction to commit work for.onePhase - If true, the transaction manager is using one-phase
optimization.
XAException (src) -
public void rollback(Xid (src) xid)
throws XAException (src)
XAResource (src)
rollback in interface XAResource (src) xid - The id of the transaction to commit work for.
XAException (src) -
public void forget(Xid (src) xid)
throws XAException (src)
XAResource (src)
forget in interface XAResource (src) xid - The id of the transaction that was ended with a heuristic
decision.
XAException (src) -
public Xid (src) [] recover(int flag)
throws XAException (src)
XAResource (src)
A recovery scan is done with one or more calls to this method.
At the first call, XAResource.TMSTARTRSCAN must be in the
flag argument to indicate that the scan should be started.
During the recovery scan, the resource manager maintains an internal
cursor that keeps track of the progress of the recovery scan.
To end the recovery scan, the XAResource.TMENDRSCAN must be passed
in the flag argument.
recover in interface XAResource (src) flag - Must be either XAResource.TMNOFLAGS, XAResource.TMSTARTRSCAN,
XAResource.TMENDRSCAN or TMSTARTRSCAN|TMENDRSCAN.
XAException (src) -
public boolean isSameRM(XAResource (src) other)
throws XAException (src)
XAResource (src) start method should be given the
XAResource.TMJOIN flag.
isSameRM in interface XAResource (src) XAException (src) -
public int getTransactionTimeout()
throws XAException (src)
XAResource (src)
getTransactionTimeout in interface XAResource (src) XAException (src) -
public boolean setTransactionTimeout(int seconds)
throws XAException (src)
XAResource (src) seconds argument is 0, the
timeout value is set to the default timeout value of the resource
manager.
Not all resource managers support setting the timeout value.
If the resource manager does not support setting the timeout
value, it should return false.
setTransactionTimeout in interface XAResource (src) seconds - The timeout value, in seconds.
XAException (src) -
|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||