Package com.arjuna.mwlabs.wst11.ba

Examples of com.arjuna.mwlabs.wst11.ba.BusinessActivityTerminatorImple


public class TxContextImple implements TxContext
{

  public TxContextImple(CoordinationContextType ctx)
  {
    _context = new ContextImple(ctx);
  }
View Full Code Here


     * @param current the current AT context implememtation
     * @return the coordination context type stashed in the current AT context implememtation
     */
    private CoordinationContextType getContextType(TxContextImple current)
    {
        ContextImple contextImple = (ContextImple)current.context();
        return contextImple.getCoordinationContext();
    }
View Full Code Here

            if (coordinationContext == null)
            {
                throw new SystemException(
                    wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at.remote.UserTransaction11Imple__2"));
            }
            return new ContextImple(coordinationContext) ;
    }
        catch (final InvalidCreateParametersException icpe)
        {
            throw icpe ;
        }
View Full Code Here

     * @param current the current AT context implememtation
     * @return the coordination context type stashed in the current AT context implememtation
     */
    private CoordinationContextType getContextType(TxContextImple current)
    {
        ContextImple contextImple = (ContextImple)current.context();
        return contextImple.getCoordinationContext();
    }
View Full Code Here

            if (coordinationContext == null)
            {
                throw new SystemException(
                    wstxLogger.log_mesg.getString("com.arjuna.mwlabs.wst.at.remote.UserTransaction11Imple__2"));
            }
            return new ContextImple(coordinationContext) ;
    }
        catch (final InvalidCreateParametersException icpe)
        {
            throw icpe ;
        }
View Full Code Here

                    timeout = (timeoutVal > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int)timeoutVal) ;
                }

        _coordManager.begin(timeout);

                final ArjunaContextImple arjunaContext = ArjunaContextImple.getContext() ;
                final ServiceRegistry serviceRegistry = ServiceRegistry.getRegistry() ;
                final String registrationCoordinatorURI = serviceRegistry.getServiceURI(CoordinationConstants.REGISTRATION_SERVICE_NAME, isSecure) ;

                final CoordinationContext coordinationContext = new CoordinationContext() ;
                coordinationContext.setCoordinationType(coordinationTypeURI);
                CoordinationContextType.Identifier identifier = new CoordinationContextType.Identifier();
                identifier.setValue("urn:"+arjunaContext.getTransactionIdentifier());
                coordinationContext.setIdentifier(identifier) ;
                final int transactionExpires = arjunaContext.getTransactionExpires();
                if (transactionExpires > 0)
                {
                    Expires expiresInstance = new Expires();
                    expiresInstance.setValue(transactionExpires);
                    coordinationContext.setExpires(expiresInstance);
View Full Code Here

                    Thread.currentThread().setContextClassLoader(SwitchYardRemotingServlet.class.getClassLoader());
                    cc = _txSerializer.deserialise(txContextHeader);
                } finally {
                    Thread.currentThread().setContextClassLoader(origCl);
                }
                final TxContext txContext = new TxContextImple(cc);
                TransactionManagerFactory.transactionManager().resume(txContext);

                // create or resume subordinate JTA transaction
                InboundBridge txInboundBridge = InboundBridgeManager.getInboundBridge();
                txInboundBridge.start();
View Full Code Here

           
            // embed WS-AT transaction context into request header
            final com.arjuna.mw.wst11.TransactionManager wsatManager = TransactionManagerFactory.transactionManager();
            CoordinationContextType coordinationContext = null;
            if (wsatManager != null) {
                final TxContextImple txContext = (TxContextImple)wsatManager.currentTransaction();
                if (txContext != null) {
                    coordinationContext = txContext.context().getCoordinationContext();
                }
            }

            if (coordinationContext != null) {
                String txContextString = _txSerializer.serialise(coordinationContext);
View Full Code Here

        ContextFactoryImple.BridgeTxData bridgeTxData = contextFactory.createBridgedTransaction(expires, isSecure);
        if (bridgeTxData != null) {
            BridgeWrapper bridgeWrapper = new BridgeWrapper();

            bridgeWrapper.context = new TxContextImple(bridgeTxData.context);
            bridgeWrapper.coordinator = bridgeTxData.coordinator;
            bridgeWrapper.id = bridgeTxData.identifier;
            return bridgeWrapper;
        } else {
            return null;
View Full Code Here

            try {
                context = atContextFactory.create(AtomicTransactionConstants.WSAT_PROTOCOL, 0L, cc, false);
            } catch (InvalidCreateParametersException e) {
                // should not happen
            }
            subordinateTxContext = new TxContextImple(context);
            subordinateContextMap.put(identifier, subordinateTxContext);

            // register a cleanup callback with the subordinate transactionso that the entry gets removed
            // when the transcation commits or rolls back
           
View Full Code Here

TOP

Related Classes of com.arjuna.mwlabs.wst11.ba.BusinessActivityTerminatorImple

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.