com.sap.conn.jco.server
Interface JCoServerTIDHandler


public interface JCoServerTIDHandler

This interface defines methods to handle transactions being received from an SAP system. The applications providing support for transactional scenarios based on tRFC and qRFC communication have to provide a custom implementation for this interface. The instance implementing this interface has to be set on the server.

See Also:
JCoServer.setTIDHandler(JCoServerTIDHandler)

Method Summary
 boolean checkTID(JCoServerContext serverCtx, java.lang.String tid)
          This function will be invoked when a transactional RFC is being called from a SAP system.
 void commit(JCoServerContext serverCtx, java.lang.String tid)
          This function will be called after all RFC functions belonging to a certain transaction have been successfully completed.
 void confirmTID(JCoServerContext serverCtx, java.lang.String tid)
          This function will be called after the local transaction has been completed.
 void rollback(JCoServerContext serverCtx, java.lang.String tid)
          This function will be called if an error has occurred in one of the RFC functions belonging to a certain transaction.
 

Method Detail

checkTID

boolean checkTID(JCoServerContext serverCtx,
                 java.lang.String tid)
This function will be invoked when a transactional RFC is being called from a SAP system. The function has to store the TID in permanent storage and return true. The method has to return false if the a transaction with this ID has already been processed successfully (i.e. was committed). It should throw an exception if anything goes wrong. The transaction processing will be aborted thereafter. In case the transaction with the passed tid is still in execution, the method should wait internally in order to return an appropriate value.

Parameters:
tid - the transaction ID
Returns:
true if the ID is valid and not in use, false otherwise

confirmTID

void confirmTID(JCoServerContext serverCtx,
                java.lang.String tid)
This function will be called after the local transaction has been completed. All resources associated with this TID can be released.

Parameters:
tid - the transaction ID

commit

void commit(JCoServerContext serverCtx,
            java.lang.String tid)
This function will be called after all RFC functions belonging to a certain transaction have been successfully completed.

Parameters:
tid - the transaction ID

rollback

void rollback(JCoServerContext serverCtx,
              java.lang.String tid)
This function will be called if an error has occurred in one of the RFC functions belonging to a certain transaction.

Parameters:
tid - the transaction ID


Copyright © 2008-2014 SAP AG. All Rights Reserved.