PDA

View Full Version : Advising HttpInvokerServiceExporter


baronludwig
Nov 19th, 2007, 11:07 AM
Hi
I wish to add some functionality around the proxy generated through exposing services through HTTP Invoker (the same question would apply if using RMI, Burlap etc..).

On the client, I woulkd like to proiduce an @Around aspect that performs Profiling of Remote calls from the client, but I have been unable to define a pointcut that captures exection of the Beans provided by the HttpInvokerProxyFactoryBean.
In the end I have had to provide a pointcut providing "call" join points.

Similarly, I am trying to capture joinpoints on the server, for execution of HttpInvokerServiceExporter beans, but again I am unable to capture.

I can use any of core AspectJ (Compile Time Weaving or Load Time Weaving), or Spring AOP.

Can anyone provide help.

Ta
Marc

nefilim
Nov 19th, 2007, 01:45 PM
Marc, not sure what the problem is? I use the example in the documentation (http://static.springframework.org/spring/docs/2.0.x/reference/transaction.html#transaction-declarative-applying-more-than-just-tx-advice) and it works fine (except for my ordering problem (http://forum.springframework.org/showthread.php?t=46388)). The pointcut expression matches the implementation of my service beans (which are exposed via RmiServiceExporter).

baronludwig
Nov 20th, 2007, 03:21 AM
Yes (suffering from information overload I think),
Following these instructions I am now able to profile the calls from the client to the HTTP Invoker calls (i.e. beans defined as HttpInvokerProxyFactoryBean).
I was defining the pointcut within an annotation style pure AspectJ pointcut, but moving the definition into the Spring AOP gets the execution call correctly. Thanks very much.

I am now going to attempt to use Spring AOP on thew server side. where I want to capture calls to my transactional beans, but only when accessed via HttpInvokerServiceExporter beans.

Many Thanks for your help.