Bugzilla – Bug 4567
Open and Close are executed in their own transaction?
Last modified: 2013-01-28 22:51:28 UTC
In many of the flows described in section 8 wrap the open and close methods with their own transaction. Why are these methods executed within their own transaction?
So they don't contribute time to the first and last chunk's transaction time.
I'm not implying that they be included in the chunk's transaction...I'm wondering why they get their own transaction at all? Since open and close are intended to be used for resource management (and not for business processing which would be assumed to be the transactional work), why do they need to be wrapped in their own transaction?
It is necessary so open can do rational things in open like create a db connection. You cannot create a connection in local mode and then enlist in global trans. So you need a consistent transaction mode else you impose unreasonable restrictions on the use of open. You might be able to get away with always running close in local mode, but it's probably better for open and close to be consistent.