All Frameworks Class Hierarchy This Framework Previous Next Indexes
VPMInterfaces Interface CATIVpmLongTransaction
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---CATIVpmLongTransaction
Usage: you can freely reimplement this interface.
interface CATIVpmLongTransaction
Interface to implement to participate in the LCA 2 phase commit protocol.
Role: This transaction interface is implemented by middleware components.
A transactional component has to register itself to the loginSession
to participate to the current transaction. Customers can implement their
own transaction component in order to participate in the LCA 2 phase commit.
The login session will call back all registered components during
the event transaction management.
onAbort is called when the LCA LoginSession is aborted.
onPrepareSave is called in the prepare phase of the LCA 2 phase commit.
onConfirmSave is called in the commit phase of the LCA 2 phase commit, if the prepare
phase has been successful.
onUnconfirmSave is called in the commit phase of the LCA 2 phase commit, if the prepare
phase has not been successful.
Method Index
- o
onAbort()
- This method is called when the LCA transaction is aborted.
- o
onConfirmSave()
- Confirm what has been done in the PrepareSave method.
- o
onPrepareSave()
- Prepare the Save procedure.
- o
onUnconfirmSave()
- Undo what has been done in the PreparseSave method.
Methods
o onAbort
public virtual HRESULT onAbort( | )= 0 |
-
This method is called when the LCA transaction is aborted.
The transaction component must roll back everything that has been done since the
last Save (or since the beginning if no Save has been done).
- Returns:
- An HRESULT value
Legal values:
- S_OK
- Undo is successful
- S_FALSE
- nothing to undo
- E_FAIL
- An error occurred during processing
o onConfirmSave
public virtual HRESULT onConfirmSave( | )= 0 |
-
Confirm what has been done in the PrepareSave method.
The LCA LoginSession calls each registered components to effectively commit the transaction
in the commit phase of the LCA 2 phase commit.
- Returns:
- An HRESULT value
Legal values:
- S_OK
- commit is successful
- S_FALSE
- nothing to commit
- E_FAIL
- An error occurred during processing
o onPrepareSave
public virtual HRESULT onPrepareSave( | )= 0 |
-
Prepare the Save procedure.
The LCA LoginSession calls each component registered in the LCA transaction,
in the prepare phase of the LCA 2 phase commit. Returning a value other than S_OK will block the LCA commit.
Note that a component that returns S_OK in the prepare phase is not allowed to fail in the
commit phase.
Prepare the Save procedure
- Returns:
- An HRESULT value
Legal values:
- S_OK
- prepare is successful
- S_FALSE
- nothing to prepare
- E_FAIL
- An error occurred during processing
o onUnconfirmSave
public virtual HRESULT onUnconfirmSave( | )= 0 |
-
Undo what has been done in the PreparseSave method.
This is called by the LCA LoginSession when one (possibly the same) component has blocked the
commit by returning a failure code in the prepare phase, so that components can revert any changes made during
that phase. For instance if a transaction
component has performed database modifications, the onUnconfirmSave should roll back the
database, while the onConfirmSave should commit it.
- Returns:
- An HRESULT value
Legal values:
- S_OK
- UnConfirm is successful
- E_FAIL
- An error occurred during processing
This object is included in the file: CATIVpmLongTransaction.h
If needed, your Imakefile.mk should include the module: GUIDVPMInterfaces