Search code examples
transactionsuniverse

Is there any documentation on configuring Rocket U2 database for transaction processing?


I am trying to implement transactioning in an application which uses a Rocket U2 Universe database (formerly IBM Universe). There is fairly good documentation on the use of UniObjects, specifically the UniSession.CreateUniTransaction method, and the BeginTransaction, Commit, RollBack, etc. methods on that UniTransaction object.

It's quite straightforward to instantiate a UniTransaction object and call BeginTransaction, but once that transaction is active, any attempt to access a Universe file results either in the code freezing or else results in an exception with the message "Cannot perform this operation while a transaction is active".

There is documentation on activating "Transaction Logging" using UniAdmin, but that documentation is of the form of "Click this then click that" with no real explanation of what parts of the underlying architecture are being affected. And in fact I cannot get the "Transaction Logging" to enter into the Enabled state, no matter how much I click "this and that". I'm not sure even if "Transaction Logging" applies to the functioning of the UniTransaction object that I have created.

If someone has managed to get the transaction processing using UniTransaction working, please can s/he point me in the right direction.


Solution

  • Ultimately I contacted our local Rocket support who after a lot of back and forth about it with Rocket HQ, there is the answer:

    To perform an operation on an instance of the UniFile class within a transaction, you must set the UniFile's UniFileLockStrategy and UniFileReleaseStrategy properties to 1 ("record lock exclusive") prior to attempting the operation.

    Terribly simple, and makes sense, but not very nicely documented.