Package 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:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkTID
(JCoServerContext serverCtx, String tid) This function will be invoked when a transactional RFC is being called from a SAP system.void
commit
(JCoServerContext serverCtx, String tid) This function will be called after all RFC functions belonging to a certain transaction have been successfully completed.void
confirmTID
(JCoServerContext serverCtx, String tid) This function will be called after the local transaction has been completed.void
rollback
(JCoServerContext serverCtx, String tid) This function will be called if an error has occurred in one of the RFC functions belonging to a certain transaction.
-
Method Details
-
checkTID
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 returntrue
. The method has to returnfalse
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:
serverCtx
- server context describes the server which gets the calltid
- the transaction ID- Returns:
true
if the ID is valid and not in use,false
otherwise
-
confirmTID
This function will be called after the local transaction has been completed. All resources associated with this TID can be released.- Parameters:
serverCtx
- server context describes the server which gets the calltid
- the transaction ID
-
commit
This function will be called after all RFC functions belonging to a certain transaction have been successfully completed.- Parameters:
serverCtx
- server context describes the server which gets the calltid
- the transaction ID
-
rollback
This function will be called if an error has occurred in one of the RFC functions belonging to a certain transaction.- Parameters:
serverCtx
- server context describes the server which gets the calltid
- the transaction ID
-