This content has been marked as final. Show 1 reply
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.