> Anyway, I've done little tests with spring OpenSessionInViewFilter and > things DO work as I desire. I mean changes are committed only when a > @Transactional method is invoked, not during events that simply update > the model without submitting.
Imo, have separate transaction methods (service/ dao) are the best way to go. I know people are using transaction-per-request filters (or request cycles), but even though that can be a very quick way to develop things, you have to be very careful of side effects just like you described. > Well, as you can see, I'm lost > here. This belongs to springforum but anyway: anyone here is aware of > what is happening behind the scenes with OpenSessionInViewFilter and > @Transactional services (defaults for @Transactional: read-write, > propagation-required...)? I mean, which is the transaction before and > after the service method invocation? Would changes occurred during > these before/after transactions be flushed (from my experiments, the > answer is no)? If it works well, anything outside of a transaction should well... be outside the transaction :) So anything touched in a read-only (auto started) transaction should never be upgraded to a write one. I'm not a Spring expert though. But that's what you can expect from the library. Eelco ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user