How does one write XA programs?
Submitted by admin on Wed, 2005-11-09 14:40.
The XA API is supported from both Pro*C and Oracle OCI (Oracle Call Interfaces). Look at the sample precompiler applications that ships with the Oracle database server.
Client:
tx_begin(); /* Begin transaction boundary */
tpm_service("Service1"); /* Call Service 1 */
tpm_service("Service2"); /* Call Service 2 */
tx_commit(); /* Commit the transaction */
Server:
Service1() {
// Get service specific data...
EXEC SQL UPDATE ....;
// Return service status back to the client...
}
Service2() {
// Get service specific data...
EXEC SQL UPDATE ....;
...
// Return service status back to client...
}»
- Login to post comments

