aspose file tools*
The moose likes Object Relational Mapping and the fly likes Hibernate and CGLIB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate and CGLIB" Watch "Hibernate and CGLIB" New topic
Author

Hibernate and CGLIB

Vedhas Pitkar
Ranch Hand

Joined: Jan 27, 2001
Posts: 445
Hi

I recently read somewhere that Hibernate now has stopped using cglib for the proxy generation and now uses JDK's dynamic proxies. Does anyone know why this was done? Was it because cglib causes performance problems?

Thanks in advance,
Vedhas
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Where did you read that? Which method to use depends on your requirements.
Vedhas Pitkar
Ranch Hand

Joined: Jan 27, 2001
Posts: 445
Here are a couple of links, though am not able to find the exact link on the Hibernate site

It seems that JavaAssist has replaced cglib

http://relation.to/Bloggers/HibernateCoreModules33


http://www.agileapproach.com/blog-entry/hibernate-33-upgrade-tips

Thanks
Vedhas
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

@Vedhas: I don't think I agree with your analysis; CGLIB still seems to be supported, just differently, with Javassist being the default byte code provider.

http://opensource.atlassian.com/projects/hibernate/browse/HHH-3832
Vedhas Pitkar
Ranch Hand

Joined: Jan 27, 2001
Posts: 445
David Newton wrote:@Vedhas: I don't think I agree with your analysis; CGLIB still seems to be supported, just differently, with Javassist being the default byte code provider.

http://opensource.atlassian.com/projects/hibernate/browse/HHH-3832


Sorry David, my first impression was that cglib has been replaced completely. Thanks for correcting me.

But, is the move to JavaAssist a pure commercial one or did they find any problem with cglib itself? Hibernate has been acquired by JBoss and JavaAssist is a JBoss product..
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I don't really know, although it looks like there were some minor issues with CGLIB, and with the relatively quiet nature of the project. Whether or not the issues were serious enough to change the default, I don't really know.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Hibernate and CGLIB