View Poll Results: What's the best practice solving the lazy loading issue with Hibernate/BlazeDS?

Voters
3. You may not vote on this poll
  • dpHibernate

    0 0%
  • Gilead

    1 33.33%
  • Granite DS

    0 0%
  • Use DTO anti-pattern

    2 66.67%
  • Other (please specify in comments)

    0 0%
Results 1 to 8 of 8

Thread: What's the best practice solving the lazy loading issue with Hibernate/BlazeDS?->POLL

  1. #1
    Join Date
    Jul 2008
    Location
    Maasmechelen (Belgium)
    Posts
    157

    Default What's the best practice solving the lazy loading issue with Hibernate/BlazeDS?->POLL

    Hi all,

    Since I'm going to have to solve a lazy loading issue on the Hibernate/Spring/BlazeDS/Flex project I'm working on (which I've temporarily “solved” by fetching early) and I’ve read a lot of solutions going into quite different directions, I was wondering what the best practice(s) might be here.

    So feel free to post your answer and comments concerning this here. Would also be nice to have some pros and cons to all the practices.

    Thank you for your cooperation!

  2. #2

    Default

    Here is some discussion about it: http://forum.springsource.org/showthread.php?t=71622

    We have used DTO anti-pattern and it has worked fine. But now we are looking forward the Hibernate serialization support for the future versions of Spring BlazeDS.

  3. #3
    Join Date
    Jul 2008
    Location
    Maasmechelen (Belgium)
    Posts
    157

    Default

    Quote Originally Posted by Durden View Post
    Here is some discussion about it: http://forum.springsource.org/showthread.php?t=71622

    We have used DTO anti-pattern and it has worked fine. But now we are looking forward the Hibernate serialization support for the future versions of Spring BlazeDS.
    Yeah, already read that post. Interesting info you posted there. Thanks!

    And I didn't know about the "Hibernate serialization" support planned. Nice to hear about it!

    Greets

  4. #4
    Join Date
    Jul 2008
    Location
    Maasmechelen (Belgium)
    Posts
    157

    Default

    just found a nice article about lazy loading, paging and the DTO pattern:
    http://www.adobe.com/devnet/flex/art...rmance_05.html

  5. #5

    Default

    Perhaps its because this poll was started prior to the inclusion of Hibernate lazy-loading serialization support in BlazeDS, but I utterly fail to see how the DTO anti-pattern helps with this problem.

    Whether or not you have the DTO, you still have to account for lazy loading on the client side via expllicitly managing requests (i.e. service finder methods) or by some special client-side proxy (e.g. dpHibernate).

    Thoughts anyone?

  6. #6
    Join Date
    Jul 2008
    Location
    Maasmechelen (Belgium)
    Posts
    157

    Default

    Quote Originally Posted by hdave View Post
    Perhaps its because this poll was started prior to the inclusion of Hibernate lazy-loading serialization support in BlazeDS, but I utterly fail to see how the DTO anti-pattern helps with this problem.

    Whether or not you have the DTO, you still have to account for lazy loading on the client side via expllicitly managing requests (i.e. service finder methods) or by some special client-side proxy (e.g. dpHibernate).

    Thoughts anyone?
    I indeed started this thread when it wasn't supported. DTO did "solve" the issue but left you stuck reconstructing the object graph yourself I guess.

    dpHibernate or GraniteDS are the only "real" lazy loading solutions I stumbled upon thus far...and I'm currently removing JPA from my current project to use pure Hibernate + dpHibernate
    Last edited by Dr.Drane; Dec 17th, 2010 at 10:19 AM.

  7. #7

    Default

    Gotcha. I currently have gone through some hoops to make my app JPA compliant. You worry me with the switch to straight hibernate. What was so bad about the Flex/AMF data services with BlazeDS?

    No lazy loading, no data sync? Can I ask what prompted you to make such a big change?

  8. #8
    Join Date
    Jul 2008
    Location
    Maasmechelen (Belgium)
    Posts
    157

    Default

    Quote Originally Posted by hdave View Post
    Gotcha. I currently have gone through some hoops to make my app JPA compliant. You worry me with the switch to straight hibernate. What was so bad about the Flex/AMF data services with BlazeDS?

    No lazy loading, no data sync? Can I ask what prompted you to make such a big change?
    I have to redevelop 2 quite big projects to Java server with Flex front and could save me a lot of time using a one size fits all solution without the need to manually fetch lazy objects on access.

    I'm still in the early Roo'ing stages, so still quite flexible in infrastructure changes... better try it now before I'm stuck doing more work than necessary I guess.

    Please correct or comment if you might think differently.

    Greets

Posting Permissions

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