Results 1 to 2 of 2

Thread: limitations of OSIV pattern?

  1. #1
    Join Date
    Oct 2008
    Posts
    23

    Default limitations of OSIV pattern?

    I have been using Seam framework with JSF/JPA/Hibernate for over 2 years now. I am now learning Spring 2.x and coming up to speed on basic concepts.

    According to this from DAllen's Seam in Action book, I'm trying to understand exactly what key deficiencies the OSIV pattern has when compared to the Seam-managed persistence context (scoped to conversation context):
    One of the key benefits of Seam is how it properly scopes the persistence manager
    (JPA EntityManager or Hibernate Session) to allow uninitialized proxies and entity
    associations to be traversed in the view without fear of encountering a Lazy-
    InitializationException (LIE). In short, they just work. In the past, developers
    have relied on the Open Session in View pattern to extend the lifetime of the persistence
    manager across a single request. Seam takes a smarter approach by binding
    the persistence manager to the conversation scope and dually wrapping a transaction
    around the request.
    For example, how would a Spring/Hibernate developer model and implement a multi-page wizard using OSIV pattern unless you use Spring Web Flow which supports the conversation concept. What about an app with JSF and Spring/Hibernate?
    Spring and Seam can co-exist in a world ruled by death, taxes and XML.

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Something has to be resposible for the management of the Session, so you'd need to do something like open session for wizard, or just use something that already provides this kind of behaviour for you. Obviously if someone cancels out of the wizard, or something else occurs you'd need to handle these kind of concerns as well.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •