-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: [ANN] CGLIB 2.0 final released
PostPosted: Sat Feb 14, 2004 5:20 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Cglib is code generation library. Hibernate uses cglib to generate lazy proxies.

There are some optimizations in this version and better integration with JAVA security. Generated classes have the same protection domain as cglib.jar (have the same signer and code base). It can be usefull if hibernate is used in app server with security
manager or for Web Start applications.


Top
 Profile  
 
 Post subject: Re: [ANN] CGLIB 2.0 final released
PostPosted: Sun Feb 15, 2004 10:28 pm 
Newbie

Joined: Thu Oct 09, 2003 4:06 pm
Posts: 16
baliukas wrote:
There are some optimizations in this version and better integration with JAVA security. Generated classes have the same protection domain as cglib.jar (have the same signer and code base). It can be usefull if hibernate is used in app server with security
manager or for Web Start applications.


Does this have to be enabled, or is it default? Is this in the version of cglib shipped with the current Hibernate distribution?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 16, 2004 3:15 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
it must be posible to replace cglib in the latest hibernate versions without recompiling. Changes are very trivial since RC2.
To "enable" security, just set security manager in code or use standard java system properties and grant permissions for cglib.

policy file used for test is this:

grant codeBase "file:${user.dir}/-"{

permission java.security.AllPermission;

};

It grants all permissions for classes loaded from current directory and all subdirectories. Gglib will use the same protection domain to define generated classes "ReflectUtils.class.getProtectionDomain()". Permissions granted for ReflectUtils are granted for generated code
(and generated code only, callback implementation is not defined by cglib)

It is
possible to add parameter to use alternatyve protection domain if somebody needs it (it can be more "secure").


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 17, 2004 4:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Juozas, would you please add an issue to JIRA (eg. "upgrade to CGLIB2 final"), and mention anything which might cause a hiccup.

Thanks man.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 17, 2004 6:25 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Ok,
but looks like there are a few hibernate versions/subversions depend on cglib2 RC1, RC2.
hibernate versions dependant on cglib2 beta will not work with cglib final,
RC1 replacement may work, RC2 must work.

I hope community will help to test backward replacement too.


Top
 Profile  
 
 Post subject: protected mutators
PostPosted: Tue Mar 02, 2004 12:13 am 
Newbie

Joined: Fri Oct 03, 2003 1:10 am
Posts: 10
If I declare persistent class mutators to have scope 'protected' then Hibernate reports that the 'reflection optimizer is disabled':

2004-03-01 19:04:56,936 INFO [ReflectHelper:149] reflection optimizer disabled for: com.navis.argo.business.reference.EquipType, BulkBeanException: tried to access method com.navis.argo.business.reference.hbr.EquipTypeHbr.setEqtypRefSet(Ljava/lang/String;)V from class com.navis.argo.business.reference.EquipType$$BulkBeanByCGLIB$$fed996a3 (property setEqtypRefSet)
Code:

Is this a known issue?  Should I worry about disabled optimization?  Solved in new cglib?

(Using Hibernate 2.1)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 02, 2004 4:09 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Cglib optimizer works for public methods only, just ignore this warning.
This optimization is not very meaningfull on jdk 1.4.x it optimizes reflection in the same way as cglib (it is possible to see in stack trace).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 02, 2004 1:08 pm 
Newbie

Joined: Fri Oct 03, 2003 1:10 am
Posts: 10
Thanks, I created JIRA issue HB-775 suggesting that this warning message be eliminated so other developers will not be similarly unnerved.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 20, 2007 3:18 pm 
Newbie

Joined: Fri Jul 20, 2007 6:02 pm
Posts: 12
Where can i find out more information about CGLIB?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.