DHVS 6.5 Batch Operations and Concurrency Scoping with Transactions

tltaylor
edited November 24, 2008 in Documentum #1

Question to anyone who can answer....

I'm looking at using the batch operations and concurrency scoping features in a high volume application. Right now, my code has transaction boundaries around the operations in question. What's not clear to me from reading the docs and searching on here is how to use these features properly with transactions and exception handling. Should I:

A) Put the batching and scoping method calls all inside a transaction? If so, how do I clean up from an exception? Do I just ignore that and let the API clean up via a rollback?

B) Put the transactions inside the batch and scoping method calls. Again, what do I do in the event of an exception?

If someone has a meatier code sample than the one included in the documentation, it woudl be much appreciated. Since this is a 24/7/365 system, I do not have the luxury of writing code that punts exceptions up for someone else to handle. They must be handled appropriately. I just need to figure out how to do it.

Comments

  • swei
    edited November 24, 2008 #2

    If your application needs to use batch operation, currency scoping and transaction all togehter, the best way is to enable the currency scope for the batch operation as the default scope via calling the API IDfScopeManager.setDefaultScope(ScopeBoundary.BATCH, bNested). With this, a scope will be automatically opened for you when a batch is open. Since opening up a batch always opens an internal transaction for you, you don't need to open another one.

    However, you still need to have your exception handler so that the batch (and its transaction) is properly aborted when thing goes wrong. This is required because the exception handling logic is per application.