All entries for Thursday 11 August 2005

August 11, 2005

Useful hibernate blog ;)

Writing about web page

So whilst struggling with the wonder that is CGLIB and hibernate proxies and lazy loading, I stumbled across link which is a very useful link.

In summary, hibernate 3 makes everything lazy including classes. This means that unless you explictly define a proxy element you will get a CGLIB class. Unfortunately CGLIB won't work if your class or any methods are final. Since lazy loading of classes isn't really that useful, turning off lazy loading would seem a sensible option. Unfortunately this means that all single point associates (one-to-one, many-to-one) are eagerly loaded, regardless of how they themselves are defined :)

As a matter of course, I always define an interface which my domain objects implement, and thus use proxies.

August 2005

Mo Tu We Th Fr Sa Su
Jul |  Today  | Sep
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31            

Search this blog



Most recent comments

  • Interesting… While I'm not completely convinced in such microbenchmarks, I'm pretty sure that 1ms … by Alexander Snaps on this entry
  • Hello. I bought the book yesterday. I was trying to find the source code for chapter 11 and chapter … by Suleman on this entry
  • by live mashup demo on this entry
  • Thanks mate ….. This blog was really helpful. by Maaz Hurzuk on this entry
  • Ty. Not directly helpful for my problem, but pointed me in the right direction. You will also get th… by Mike E. on this entry

Blog archive

Not signed in
Sign in

Powered by BlogBuilder