Java transaction design strategy