on 04-17-2008 6:52 PM
Hi,
How do we maintain atomicity across many query templates executed in a transaction?
For example, I have a xMII transaction called "Foo.trx". This transaction calls SQL QueryTemplates "Q1" "Q2", ..... "Qn". My requirement is to have all query templates executed successfully or none of them commited in the database.
Thanks,
Sara
....short answer, is that you can't. A few options:
1) Use a predefined stored procedure (obviously not desirable from a maintenance standpoint)
2) Dynamically generate the stored procedure (essentially build up the SQL via a series of actions), and execute it as a single SQL statement
3) Create your own custom actions that would
a) An action to obtain database connection with "autocommit" off
b) An action to execute a query that would be "linked" to an "OpenConnection" action (you could call any number of these actions)
c) An action to commit the transaction(s) and close/release the connection
d) An action to rollback the transaction(s) and close/release the connection
This would be logically similar to the way the JCO calls work.
Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.