David M Johnson wrote:
On Apr 15, 2006, at 7:26 PM, Allen Gilliland wrote:
So when it is all said and done the details of what I am proposing
would be as follows.
We use the newbackend that I have outlined in my proposal and coded in
the roller-newbackend branch with these changes to come:
There are a lot of things to like about the code in the
roller-newbackend branch:
- Removal of the old and confusing abstract implementations of the
manager interfaces
- Removal of persistence logic from the POJOs
- Removal of the unnecessary setUser() and getUser() methods
I definitely want to get those changes into the trunk.
yep, all of that stuff will stay.
1. Remove all lines in XXXManager methods which trigger a commit.
This means that any call to an XXXManager method is not automatically
committed.
That sounds like a vast improvement over what you have now. Removing all
that transaction code is the first step towards declarative transactions
and I like that a lot.
i agree.
2. Add a new flush() method to the Roller interface. This method will
trigger a commit on the persistence implementation and if an Exception
occurs a rollback will happen automatically.
3. Go back into the Roller model code and add in calls to
Roller.flush(). This will basically just replace all the current
calls to Roller.commit() in the current trunk.
I think that is all that is required to apply this modification to the
current backend refactoring proposal.
+1 on the new plan.
i went ahead and committed this to the newbackend branch figuring that
everyone would be in agreement.
i have a little bit more cleanup work to do over the next day or so and
then everything should be all set to take a final look at and then
commit back to the trunk.
-- Allen
- Dave