Announcement Announcement Module
No announcement yet.
Howto combine Hessian and AspectJ Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Howto combine Hessian and AspectJ

    Hi all,

    First of all, this is a cross post. I also asked this in the AspectJ forum but without any luck. With any luck, you guys can help me.

    I've got a question regarding AspectJ and Hessian: I'm stuck with an application which exists out of a server part and a client part.

    On the server, I've got some classes which are exposed on a webservice by means of Hessian. These classes have setter methods, ... . The Hessian webservice is consumed by the client application residing on an Android phone.

    So, whenever on of the set methods is called on the client, this goes to the server. Now, I'd like to log these actions by means of an Aspect on the server: the LoggingAspect.

    The problem is however that AspectJ creates JDK proxies for each class which has matches the pointcut of the LoggingAspect. Hessian now tries to serialize the JDK proxy and fails with the method below:

    SEVERE: Servlet.service() for servlet remoting threw exception
    java.lang.IllegalStateException: Serialized class org.springframework.aop.aspectj.annotation.Instant iationModelAwarePointcutAdvisorImpl must implement

    I already though about creating my own Hessian SerializerFactory but I don't know on what to do when I have a $Proxy class.

    Any clues on how to solve this? So, how to have an Aspect working on the server part without serializing the complete AOP stack (since the method must not be logged on the client but only on the server).

    Thanks in advance,