Methods Summary |
---|
public void | begin()
getTransactionManagerImpl().begin();
|
public void | commit()
getTransactionManagerImpl().commit();
|
public int | getStatus()
return getTransactionManagerImpl().getStatus();
|
public javax.transaction.Transaction | getTransaction()
return getTransactionManagerImpl().getTransaction();
|
public static javax.transaction.TransactionManager | getTransactionManager()
return tmHelper;
|
private J2EETransactionManager | getTransactionManagerImpl()
J2EETransactionManager tm = Switch.getSwitch().getTransactionManager();
if (tm != null)
return tm;
new UserTransactionImpl(); // Hack to make clients work using this class
tm = Switch.getSwitch().getTransactionManager();
return tm;
|
public int | getTransactionRemainingTimeout()Return duration before current transaction would timeout.
int timeout = 0;
Transaction txn = getTransaction();
if (txn == null) {
throw new IllegalStateException("no current transaction");
} else if (txn instanceof J2EETransaction) {
timeout = ((J2EETransaction)txn).getRemainingTimeout();
}
return timeout;
|
public javax.resource.spi.XATerminator | getXATerminator()
return getTransactionManagerImpl().getXATerminator();
|
public void | recreate(javax.transaction.xa.Xid xid, long timeout)
final J2EETransactionManager tm = getTransactionManagerImpl();
try {
tm.recreate(xid, timeout);
} catch (javax.resource.spi.work.WorkException ex) {
throw new IllegalStateException(ex);
}
servletPreInvokeTx();
|
public void | release(javax.transaction.xa.Xid xid)
IllegalStateException rethrow = null;
final J2EETransactionManager tm = getTransactionManagerImpl();
servletPostInvokeTx(false);
try {
tm.release(xid);
} catch (javax.resource.spi.work.WorkException ex) {
throw new IllegalStateException(ex);
} finally {
if (tm instanceof J2EETransactionManagerOpt) {
((J2EETransactionManagerOpt) tm).clearThreadTx();
}
if (rethrow != null) {
throw rethrow;
}
}
|
public void | resume(javax.transaction.Transaction tobj)
getTransactionManagerImpl().resume(tobj);
|
public void | rollback()
getTransactionManagerImpl().rollback();
|
public void | servletPostInvokeTx(boolean suspend)PostInvoke Transaction configuration for Servlet Container.
BaseContainer.preInvokeTx() handles all this for CMT EJB.
Precondition: assumed called prior to current transcation being
suspended or released.
final ComponentInvocation inv =
Switch.getSwitch().getInvocationManager().getCurrentInvocation();
if (inv != null && inv.getInvocationType() ==
ComponentInvocation.SERVLET_INVOCATION) {
try {
getTransactionManagerImpl().delistComponentResources(suspend);
} catch (java.rmi.RemoteException re) {
throw new IllegalStateException(re);
} finally {
inv.setTransaction(null);
}
}
|
public void | servletPreInvokeTx()PreInvoke Transaction configuration for Servlet Container.
BaseContainer.preInvokeTx() handles all this for CMT EJB.
Compensate that J2EEInstanceListener.handleBeforeEvent(
BEFORE_SERVICE_EVENT)
gets called before WSIT WSTX Service pipe associates a JTA txn with
incoming thread.
Precondition: assumes JTA transaction already associated with current
thread.
final ComponentInvocation inv =
Switch.getSwitch().getInvocationManager().getCurrentInvocation();
if (inv != null &&
inv.getInvocationType() == ComponentInvocation.SERVLET_INVOCATION){
try {
// Required side effect: note that
// enlistComponentResources calls
// ComponentInvocation.setTransaction(currentJTATxn).
// If this is not correctly set, managed XAResource connections
// are not auto enlisted when they are created.
getTransactionManagerImpl().enlistComponentResources();
} catch (java.rmi.RemoteException re) {
throw new IllegalStateException(re);
}
}
|
public void | setRollbackOnly()
getTransactionManagerImpl().setRollbackOnly();
|
public void | setTransactionTimeout(int seconds)
getTransactionManagerImpl().setTransactionTimeout(seconds);
|
public javax.transaction.Transaction | suspend()
return getTransactionManagerImpl().suspend();
|