Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.arjuna.mwlabs.wst11.ba;
  
 
Local business activity terminator which can be used to close a business activity from the terminator side.
 
         implements BusinessActivityTerminator
 {
     private W3CEndpointReference participantEndpoint;

    
create a business activity terminator for use on the server side with an empty participant endpoint which gets set at registration time

 
             throws SystemException
     {
         try
         {
              = CoordinatorManagerFactory.coordinatorManager();
              = .currentActivity();
         }
         catch (ProtocolNotRegisteredException pnre)
         {
             throw new SystemException(pnre.toString());
         }
         catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
         {
             throw new SystemException(ex.toString());
         }
 
          = null;
     }
 
     {
         try
         {
             if ( == null)
             throw new UnknownTransactionException();
 
             .resume();
 
             .close();
         }
         catch (com.arjuna.mw.wsas.exceptions.InvalidActivityException ex)
         {
             throw new UnknownTransactionException();
         }
         catch (com.arjuna.mw.wsas.exceptions.ProtocolViolationException ex)
         {
             throw new SystemException(ex.toString());
         }
         {
             throw new TransactionRolledBackException();
         }
         catch (com.arjuna.mw.wscf.exceptions.NoCoordinatorException ex)
         {
             throw new UnknownTransactionException();
         }
         catch (com.arjuna.mw.wsas.exceptions.WrongStateException ex)
         {
             throw new SystemException(ex.toString());
         }
         catch (com.arjuna.mw.wsas.exceptions.NoPermissionException ex)
         {
             throw new SystemException(ex.toString());
         }
         catch (com.arjuna.mw.wsas.exceptions.SystemException ex)
         {
             throw new SystemException(ex.toString());
         }
         catch (UnknownTransactionException ex)
         {
             throw ex;
         }
         finally
         {
             TerminationCoordinatorProcessor.getProcessor().deactivateParticipant(this) ;
         }
     }
 
    public void cancel () throws UnknownTransactionExceptionSystemException
    {
	try
	{
	    if ( == null)
	}
	{
	    throw new UnknownTransactionException();
	}
	{
	    throw new SystemException(ex.toString());
	}
	{
	    throw new SystemException(ex.toString());
	}
	{
	    throw new SystemException(ex.toString());
	}
	{
	    throw new SystemException(ex.toString());
	}
	{
	    throw new UnknownTransactionException();
	}
	{
	    throw new SystemException();
	}
	{
	    throw ex;
	}
	finally
	{
        TerminationCoordinatorProcessor.getProcessor().deactivateParticipant(this) ;
	}
    }

    
Complete doesn't mean go away, it just means that all work you need to accomplish the commit/rollback has been received.
    public void complete () throws UnknownTransactionExceptionSystemException
    {
	try
	{
	    if ( == null)
	}
	{
	    throw new UnknownTransactionException();
	}
	{
	    throw new SystemException(ex.toString());
	}
	{
	    throw new SystemException(ex.toString());
	}
	{
	    throw new SystemException(ex.toString());
	}
	{
	    throw new UnknownTransactionException();
	}
	{
	    throw new SystemException();
	}
	{
	    throw ex;
	}
    }

    
update the business activity terminator with an endpoint supplied at registration time

Parameters:
participantEndpoint
    public void setEndpoint(W3CEndpointReference participantEndpoint)
    {
        this. = participantEndpoint;
    }

    
retrieve the participant endpoint associated with this business activity terminator

Returns:
    {
        return ;
    }
    private CoordinatorManager _coordManager = null;
    private ActivityHierarchy _hier = null;
New to GrepCode? Check out our FAQ X