/** * Process inbound messages by mapping the WS transaction context * to a JTA one and associating the latter to the current Thread. * * @param msgContext unused * @return true on success, false on error */ protected boolean handleInbound(MessageContext msgContext) { txbridgeLogger.logger.trace("JaxWSTxInboundBridgeHandler.handleInbound()"); try { inboundBridge = org.jboss.jbossts.txbridge.inbound.InboundBridgeManager.getInboundBridge(); inboundBridge.start(); } catch (Exception e) { txbridgeLogger.logger.error(e); return false; } return true; }
/** * Break the association between the JTA transaction context and the calling Thread. * * @return true on success, false on error */ private boolean suspendTransaction() { txbridgeLogger.logger.trace("JaxWSTxInboundBridgeHandler.suspendTransaction()"); try { inboundBridge.stop(); } catch (Exception e) { txbridgeLogger.logger.error(e); return false; } return true; } }
/** * Create a new InboundBridge to manage the given subordinate JTA transaction. * * @param xid the subordinate transaction id * @throws XAException * @throws SystemException */ InboundBridge(Xid xid) throws XAException, SystemException { txbridgeLogger.logger.trace("InboundBridge.<ctor>(Xid="+xid+")"); this.xid = xid; getTransaction(); // ensures transaction is initialized }
inboundBridge.start(); inboundBridge.setRollbackOnly(); try inboundBridge.setRollbackOnly(); inboundBridge.stop();
transactionManager.enlistForVolatileTwoPhase(bridgeVolatileParticipant, new Uid().toString()); inboundBridgeMappings.put(externalTxId, new InboundBridge(xid));
private void bridgeOutgoingTransaction() { try { // disassociate subordinate JTA transaction InboundBridge txInboundBridge = InboundBridgeManager.getInboundBridge(); txInboundBridge.stop(); // disassociate WS-AT transaction final com.arjuna.mw.wst11.TransactionManager wsatManager = TransactionManagerFactory.transactionManager(); if (wsatManager != null) { wsatManager.suspend(); } } catch (final Throwable th) { throw new SwitchYardException(th); } }
txInboundBridge.start(); return true;
public void setRollbackOnly() throws XAException, SystemException { txbridgeLogger.logger.trace("InboundBridge.setRollbackOnly("+xid+")"); getTransaction().setRollbackOnly(); }
private void bridgeOutgoingTransaction() { try { // disassociate subordinate JTA transaction InboundBridge txInboundBridge = InboundBridgeManager.getInboundBridge(); txInboundBridge.stop(); // disassociate WS-AT transaction final com.arjuna.mw.wst11.TransactionManager wsatManager = TransactionManagerFactory.transactionManager(); if (wsatManager != null) { wsatManager.suspend(); } } catch (final Throwable th) { throw new SwitchYardException(th); } }
txInboundBridge.start(); return true;
/** * Associate the JTA transaction to the current Thread. * Typically used by a server side inbound handler. * * @throws XAException * @throws SystemException * @throws InvalidTransactionException */ public void start() throws XAException, SystemException, InvalidTransactionException { txbridgeLogger.logger.trace("InboundBridge.start(Xid="+xid+")"); Transaction tx = getTransaction(); TransactionManager.transactionManager().resume(tx); }