solidDB Help : Replication : Advanced Replication : Using Advanced Replication with applications : Implementing Intelligent Transactions : Using the Advanced Replication parameter bulletin board : Assigning properties to a replicated transaction
  
Assigning properties to a replicated transaction
Transaction properties are used for describing an entire replicated transaction. These parameters are persistent parameters that are defined in the replica database by using the SAVE PROPERTY statement and which persist until the transaction (to which they are attached) has been successfully propagated to the master database and executed there. The SAVE PROPERTY statement stores the parameter for a transaction (that can be propagated) in the replica database. When the propagated transaction is later executed in the master, these parameters are put to the parameter bulletin board (in the master database) in the beginning of the transaction. Any procedure of the transaction can query the value of this parameter by using the GET_PARAM() function.
The transaction properties can be used for two purposes.
to act as a selection criteria for selecting the transactions to propagate in a synchronization message,
internally by the procedures of the transaction when it is executed in the master database.
To save a property to a transaction use the SAVE PROPERTY statement, see SAVE PROPERTY.
For example:
SAVE PROPERTY priority VALUE '1';
This parameter can be used as a search criterion for the transaction propagation process ("propagate only those transactions that have parameter ‘priority’ with value ‘1’"). For example:
MESSAGE APPEND PROPAGATE TRANSACTIONS WHERE priority = '1';
When the transaction has been propagated to the master database, the values of all defined properties of this transaction are available from the parameter bulletin board of the transaction when the transaction is executed in the master database. Thus, you can query the value of the "priority" property from a procedure by using the GET_PARAMI() function.
DECLARE priority_value CHAR(1); priority_value := GET_PARAM('priority');
This information can be used by the application, for example, to determine how a possible update conflict should be resolved with this particular transaction.
Go up to
Using the Advanced Replication parameter bulletin board