From: Anton v. S. <an...@ap...> - 2002-05-22 05:35:53
|
> I'm not yet 100% sure if > TransactionalSession should be left as an exercise for the user or > should eventually be integrated into the core API. I am 100% sure I > don't want to make the decision now, cos I might regret it. Makes sense. >... > > Session s = sf.openSession(); > Transaction t = tf.beginTransaction(s); > try { > Foo foo = s.load(fooid); > foo.setName("FOO"); > t.commit(); > } > catch (Exception e) { > t.rollback(); > } > finally { > s.close(); > } > > Thats pretty nice, surely? Yes, it's excellent, thank you. (Don't think I didn't notice that beginTransaction() wasn't added to Session, though! Sneaky but smart... :) > Unless other people start shouting at me, I'm ready to either > implement, or let Anton implement I'd be happy to work on this, to make up for having introduced this last-minute reshuffle. Let me take a look at it on Wednesday and/or Thursday, and I'll report back once I've done that. I may respond to other parts of your message tomorrow - I was out all day today. Anton |