use of com.arjuna.mw.wsc11.context.Context in project narayana by jbosstm.
the class UserBusinessActivityStandaloneImple method begin.
public void begin(int timeout) throws WrongStateException, SystemException {
try {
if (_ctxManager.currentTransaction() != null)
throw new WrongStateException();
Context ctx = startTransaction(timeout, null);
_ctxManager.resume(new TxContextImple(ctx));
} catch (InvalidCreateParametersException ex) {
tidyup();
throw new SystemException(ex.toString());
} catch (UnknownTransactionException ex) {
tidyup();
throw new SystemException(ex.toString());
} catch (SystemException ex) {
tidyup();
throw ex;
}
}
use of com.arjuna.mw.wsc11.context.Context in project narayana by jbosstm.
the class UserTransactionImple method beginSubordinate.
/**
* method provided for the benefit of UserSubordinateTransactionImple to allow it
* to begin a subordinate transaction which requires an existing context to be
* installed on the thread before it will start and instal la new transaction
*
* @param timeout
* @throws WrongStateException
* @throws SystemException
*/
public void beginSubordinate(int timeout) throws WrongStateException, SystemException {
try {
TxContext current = _ctxManager.currentTransaction();
if ((current == null) || !(current instanceof TxContextImple))
throw new WrongStateException();
TxContextImple currentImple = (TxContextImple) current;
Context ctx = startTransaction(timeout, currentImple);
_ctxManager.resume(new TxContextImple(ctx));
// n.b. we don't enlist the subordinate transaction for completion
// that ensures that any attempt to commit or rollback will fail
} catch (com.arjuna.wsc.InvalidCreateParametersException ex) {
tidyup();
throw new SystemException(ex.toString());
} catch (com.arjuna.wst.UnknownTransactionException ex) {
tidyup();
throw new SystemException(ex.toString());
} catch (SystemException ex) {
tidyup();
throw ex;
}
}
use of com.arjuna.mw.wsc11.context.Context in project narayana by jbosstm.
the class UserTransactionImple method begin.
public void begin(int timeout) throws WrongStateException, SystemException {
try {
if (_ctxManager.currentTransaction() != null)
throw new WrongStateException();
Context ctx = startTransaction(timeout, null);
_ctxManager.resume(new TxContextImple(ctx));
enlistCompletionParticipants();
} catch (com.arjuna.wsc.InvalidCreateParametersException ex) {
tidyup();
throw new SystemException(ex.toString());
} catch (com.arjuna.wst.UnknownTransactionException ex) {
tidyup();
throw new SystemException(ex.toString());
} catch (SystemException ex) {
tidyup();
throw ex;
}
}
use of com.arjuna.mw.wsc11.context.Context in project narayana by jbosstm.
the class UserTransactionStandaloneImple method begin.
public void begin(int timeout) throws WrongStateException, SystemException {
try {
if (_ctxManager.currentTransaction() != null)
throw new WrongStateException();
Context ctx = startTransaction(timeout, null);
_ctxManager.resume(new TxContextImple(ctx));
enlistCompletionParticipants();
} catch (InvalidCreateParametersException ex) {
tidyup();
throw new SystemException(ex.toString());
} catch (UnknownTransactionException ex) {
tidyup();
throw new SystemException(ex.toString());
} catch (SystemException ex) {
tidyup();
throw ex;
}
}
use of com.arjuna.mw.wsc11.context.Context in project narayana by jbosstm.
the class UserBusinessActivityImple method beginSubordinate.
public void beginSubordinate(int timeout) throws WrongStateException, SystemException {
try {
TxContext current = _ctxManager.currentTransaction();
if ((current == null) || !(current instanceof TxContextImple))
throw new WrongStateException();
TxContextImple currentImple = (TxContextImple) current;
Context ctx = startTransaction(timeout, currentImple);
_ctxManager.resume(new TxContextImple(ctx));
// n.b. we don't enlist the subordinate transaction for completion
// that ensures that any attempt to commit or rollback will fail
} catch (com.arjuna.wsc.InvalidCreateParametersException ex) {
tidyup();
throw new SystemException(ex.toString());
} catch (com.arjuna.wst.UnknownTransactionException ex) {
tidyup();
throw new SystemException(ex.toString());
} catch (SystemException ex) {
tidyup();
throw ex;
}
}
Aggregations