Bug 4567 - Open and Close are executed in their own transaction?
Open and Close are executed in their own transaction?
Status: RESOLVED WORKSFORME
Product: jbatch
Classification: Unclassified
Component: source
1
All All
: P5 normal
: ---
Assigned To: cvignola
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-18 17:09 UTC by mminella
Modified: 2013-01-28 22:51 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mminella 2013-01-18 17:09:29 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?
Comment 1 cvignola 2013-01-18 17:27:18 UTC
So they don't contribute time to the first and last chunk's transaction time.
Comment 2 mminella 2013-01-18 20:16:57 UTC
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?
Comment 3 cvignola 2013-01-21 14:26:34 UTC
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.