Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Object Relational Mapping and the fly likes Transaction handling in 3-tier layered application using Wicket + Spring + Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Transaction handling in 3-tier layered application using Wicket + Spring + Hibernate" Watch "Transaction handling in 3-tier layered application using Wicket + Spring + Hibernate" New topic
Author

Transaction handling in 3-tier layered application using Wicket + Spring + Hibernate

P Kuling
Greenhorn

Joined: Aug 07, 2008
Posts: 10
Hi,

I'm thinking about using the Open Session In View (OSIV) filter or interceptor that comes with Spring, as it seems like a convenient way for me as a developer. If that's what you recommend, do you recommend using a filter or an interceptor and why?

I'm also wondering how it will mix with HibernateTemplate and if I will loose the ability to mark methods as @Transactional(readOnly = true) etc and thus loose the ability to get some more fine grained transaction control?

Is there some kind of best practice for how to integrate this kind of solution with a three tier architecture using Hibernate and Spring (as I suppose my decision to use Wicket for presentation shouldn't matter much)?

If I use OSIV I will at least never run into lazy loading exceptions, on the other hand my transaction will live longer before being able to commit by being uncommitted in the view as well.
 
 
subject: Transaction handling in 3-tier layered application using Wicket + Spring + Hibernate
 
Similar Threads
Exception on Save operation with Spring annotation
Struts 2: Is Model Driven fundamentally flawed in most uses?
Spring, in Spring-Struts-Hibernate application
Grails - OSIV - Stop Open Session In View filter for Static Resources
Alternatives to Open Session in View pattern?