PDA

View Full Version : when proxies using inheritance will be implemented



SummerOne
09-19-2008, 07:06 AM
Hi,Mark

I have read this ----"In a future release we will implement proxies using inheritance,which will allow you to proxy classes without interfaces" in Spring.NET documention.

And I want to know when it will be implemented. Is it impossible to expect this in the next release?

Thanks for your answer.

Erich Eichinger
09-19-2008, 09:56 PM
Hi,

this is already in the framework for quite a while. Just set "ProxyTargetType='true' (http://springframework.net/docs/1.2.0-M1/reference/html/aop.html#aop-pfb-2)" on your AutoProxyCreator.

Another option you might want to check out is the InheritanceBasedAopConfigurer (http://springframework.net/docs/1.2.0-M1/reference/html/aop.html#aop-inheritancebasedaopconfigurer).

hope this helps,
Erich

SummerOne
10-07-2008, 08:38 AM
Thanks,Erich

Still some questions. As far as I known all methods which can be intercepted must implement one or some interfaces.

But in my project, half methods do not implement inferface but inherit basic class. How to intercept these methods in Spring.NET AOP.

I want to know very much.

Thanks for your answer!!

Piotr Jurga
10-14-2008, 07:49 AM
Hi
As Erich said:


Just set "ProxyTargetType='true'" on your AutoProxyCreator.

and then you have to remember to set all methods that have to be proxied as virtual.

Piotr