On Mar 1, 2006, at 1:06 PM, Allen Gilliland wrote:
On Wed, 2006-03-01 at 05:28, David M Johnson wrote:
In the current code I only see this ...
Roller.begin() - 6 uses
Roller.begin(user) - 4 uses
Roller.commit() - 7 uses
Roller.rollback() - 0 uses
PersistenceStrategy.begin() - 4 uses, just from RollerImpl classes
PersistenceStrategy.commit() - 4 uses, mainly RollerImpl classes
Where are you getting that data? Netbeans reports 159 usages of
Roller.commit() and 17 usages of Roller.rollback().
hmm, i am using netbeans as well.
i was using the "Find Usages" function and only counting uses in
the "src" directory, not tests, etc. it does look like netbeans
isn't including some usages of "commit" for some reason, i do see
it appear more times if i do a search. however, i would say that
uses of begin() and rollback() are the same numbers that i gave
before, they are obviously not being used everywhere.
I would expect the numbers for begin() to be small. The pattern is
that we call begin() when we start processing a request, if changes
are made during the request the action that makes them MUST call
commit(), and then when we finish processing a request we call
rollback() just for good measure.
- Dave