1 Reply Latest reply on Mar 31, 2005 8:55 PM by ovidiu.feodorov

    JMS Facade question on client side interceptors

    timfox

      This is probably a dumb question, but I'm still getting my head around the JMS Facade interceptor architecture, so please be kind ;)

      Client side interceptor stacks are currently created in the corresponding server side delegate implementation.

      E.g. ServerConnectionDelegate creates the "SessionStack" interceptor stack in the createSessionDelegate() method.

      In the JBoss 4.0 messaging implementation, the client stack gets created in the FactoryInterceptor on the client side.

      I was just wondering why it's been chosen to create the client interceptor stack on the server side and passing it back to the client, rather than use a client side factory interceptor to do this?

      Also I wasn't sure how the SessionDelegate proxy created in the ServerConnectionDelegate.createSessionDelegate() method gets back to the client side since it doesn't seem to be serializable.

      -Tim

        • 1. Re: JMS Facade question on client side interceptors
          ovidiu.feodorov

           

          In the JBoss 4.0 messaging implementation, the client stack gets created in the FactoryInterceptor on the client side.
          I was just wondering why it's been chosen to create the client interceptor stack on the server side and passing it back to the client, rather than use a client side factory interceptor to do this?


          A practical reason: the interceptor configuration for each client-side container (Connection, Session, Producer) is specified in the server-side configuration file (jms-aop.xml). This file is part of the server configuration. In order to create the interceptor stacks - and the proxies - on the client side, I would have had to send somehow the interceptor configuration on the client, which is unnecessary.

          Currently I am sending directly the proxy. This approach is consistent with the way the ConnectionFactory proxy is created.

          Also I wasn't sure how the SessionDelegate proxy created in the ServerConnectionDelegate.createSessionDelegate() method gets back to the client side since it doesn't seem to be serializable.


          It is serializable. If you look at the client-side interceptors, all of them are serializable.