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.
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.
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.
- Dave