When deploying multiple remoting servers, there are some important issues to keep in mind to help avoid problems. The first thing is to understand how the components fit together on the server side. The root deployment component is a Connector. The Connector basically binds together the server invoker and the handlers that will receive the requests from the server invoker. There is only one server invoker allowed per Connector, but the server invoker may have one or more handlers.
If add handler to Connector instance (via addIvocationhandler() method or via xml config) with same subsytem value, if there is one that already exists, it will be removed and the new added. If this is done via the addInvocationHandler() method, it will return either the existing handler, if one already exists, or null if one did not previously exist with the same subsystem value.
If on the client, no subsystem is specified, the server invoker will select the last handler added to send the invocation to. One thing to watch out for here is create a Connector with only one handler and use a client to connect to it without specifying the subsystem for that handler and someone else creates another Connector using the same locator url and add another handler, it is this second handler that will receive the invocation from the initial client.
There is also a problem that exists with the shutting down of duplicate Connectors. If shutdown a Connector that is using the same server invoker as another Connector, will be shutting down the server invoker underneath the other connector (without warning or notification). Reference Jira issue JBREM-84 for more information on this.
Comments