Why would I want to use more than one object adapter?

A typical server should never need to use more than one object adapter. If you are considering using multiple object adapters, we suggest that you check whether any of the items in the list below apply to your situation:

  • You need fine-grained control over which objects are accessible. For example, you could have an object adapter with only secure endpoints to restrict access to some administrative objects, and another object adapter with non-secure endpoints for other objects. Because an object adapter is associated with one or more transport endpoints, you can firewall a particular port, so objects associated with the corresponding endpoint cannot be reached unless the firewall rules are satisfied.
  • You need control over the number of threads for different sets of objects in your application. For example, you may not need concurrency on the objects connected to a particular object adapter, and multiple object adapters, each with its own thread pool, can be useful to solve deadlocks. (See Bernard Normier's deadlock articles in issue 4 and issue 5 of Connections.)
  • You want to be able to temporarily disable processing new requests for a set of objects. This can be accomplished by placing an object adapter in the holding state.
  • You want to set up different request routing when using an Ice router with Glacier2.

If none of the preceding items apply, chances are that you do not need more than one object adapter.

See Also