Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

CGLIB proxies in Spring

  Asked By: Aysel    Date: Jun 12    Category: Java    Views: 1215
  

I hear people are showing love for spring here, and one is calling for
war between the Orthodox Jewish EJB3 and the kosher enough Spring. So,
I thought it is a good time to jump in and ask a question ;)

I need to tell Spring not to proxy a selection of my beans with JDK
proxies, but with CGLIB proxies. The documentation tells how to do
this for an entire context but it does not imply how to change it only
for a set of beans. Do you know how I can do this? My understanding is
that Spring will use CGLIB proxies if my bean does not implement any
interface but that's not good enough for me. Any other way around it?
I'd rather not define a new context for these beans.

In any events, am I getting CGLIB freak here? Is it really bad to
proxy your bean with CGLIB? I heard CGLIB doesn't like final methods,
and I am afraid I will have to scan a huge pile of code to ensure no
final method is used, or if used they do not need the injected
aspect(s). Crazy eh?

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on CGLIB proxies in Spring Or get search suggestion and latest updates.




Tagged: