/** * obtain a resumable transaction context for the bridged-to transaction * @return a resumable transaction context * @throws UnknownTransactionException if this transaction has been recovered from the log and hence * has no associated transaction context. */ public TxContext getContext() throws UnknownTransactionException { if (context != null) { return context; } else { throw new UnknownTransactionException(); } }
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; } }
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; } }
throw new UnknownTransactionException(); throw new UnknownTransactionException(); throw new UnknownTransactionException();
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; } }
throw new UnknownTransactionException(); throw new UnknownTransactionException(); throw new UnknownTransactionException();
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; } }
throw new UnknownTransactionException(); throw new UnknownTransactionException(); throw new UnknownTransactionException();
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; } }
throw new UnknownTransactionException(); throw new UnknownTransactionException(); throw new UnknownTransactionException();
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; } }
throw new UnknownTransactionException(); throw new UnknownTransactionException(); throw new UnknownTransactionException();
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; } }
throw new UnknownTransactionException(); throw new UnknownTransactionException(); throw new UnknownTransactionException();
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; } }
private final void enlistCompletionParticipants () throws WrongStateException, UnknownTransactionException, SystemException { TransactionManagerImple tm = (TransactionManagerImple) TransactionManager.getTransactionManager(); final TxContextImple currentTx = (TxContextImple) tm.currentTransaction(); if (currentTx == null) throw new UnknownTransactionException(); final String id = currentTx.identifier(); W3CEndpointReference completionCoordinator = null; try { completionCoordinator = tm.registerParticipant(null, AtomicTransactionConstants.WSAT_SUB_PROTOCOL_COMPLETION_RPC); } catch (InvalidProtocolException ex) { ex.printStackTrace(); throw new SystemException(ex.toString()); } catch (InvalidStateException ex) { throw new WrongStateException(); } catch (CannotRegisterException ex) { // cause could actually be no activity or already registered throw new UnknownTransactionException(); } _completionCoordinators.put(id, completionCoordinator); }
throw new SystemException(ex.toString());
private final void enlistCompletionParticipants () throws WrongStateException, UnknownTransactionException, SystemException { TransactionManagerImple tm = (TransactionManagerImple) TransactionManager.getTransactionManager(); final TxContextImple currentTx = (TxContextImple) tm.currentTransaction(); if (currentTx == null) throw new UnknownTransactionException(); final String id = currentTx.identifier(); W3CEndpointReference completionCoordinator = null; try { completionCoordinator = tm.registerParticipant(null, AtomicTransactionConstants.WSAT_SUB_PROTOCOL_COMPLETION_RPC); } catch (InvalidProtocolException ex) { ex.printStackTrace(); throw new SystemException(ex.toString()); } catch (InvalidStateException ex) { throw new WrongStateException(); } catch (CannotRegisterException ex) { // cause could actually be no activity or already registered throw new UnknownTransactionException(); } _completionCoordinators.put(id, completionCoordinator); }
throw new SystemException(ex.toString());
public void rollback () throws UnknownTransactionException, SystemException { final MAP map = AddressingHelper.createNotificationContext(MessageId.getMessageId()) ; try { CompletionCoordinatorRPCClient.getClient().sendRollback(_completionCoordinator, map) ; } catch (final SoapFault soapFault) { if (ArjunaTXConstants.UNKNOWNTRANSACTION_ERROR_CODE_QNAME.equals(soapFault.getSubcode())) { throw new UnknownTransactionException(soapFault.getMessage()); } throw new SystemException(soapFault.getMessage()) ; } catch (final Throwable th) { th.printStackTrace() ; throw new SystemException(th.getMessage()) ; } } }