Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPA lazy load

 
Usman Ibrahim
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

Do anyone used JPA showing Lazyload in the sequence diagram. i.e. propagating the POJO from managed bean to session bean to just call the method which returns the collection of objects which was not loaded initially.

Many thanks

Usman.
 
Rishi Shehrawat
Ranch Hand
Posts: 218
Hibernate Java Spring
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think this level of detail is required in sequence diagram. You can mention this is decisions section for improving performance.

The DAO/service layer will need to know what data is required by the web layer & will need to prefetch the data as Entity Manager will be closed/not availaible in web layer. Hibernate provides OpenSessionInViewInterceptor, which basically keeps the hibernate session open. Am not sure if something similar is availaible in JPA.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic