Since the brokers are running in their own threads, they continue to run in the background handling connections and performing the housekeeping tasks while the core of the servlet is called in successive threads. If a particular servlet fails, only its own connections are affected allowing the rest of the application to continue running normally. As summarized in the diagram below, there are several important advantages in the 2 Tier approach. By taking advantage of the ability to run internal broker threads, the 2 Tier approach avoids the complexity involved in designing and implementing a stand-alone broker. Implementing a broker thread is as simple as creating a new instance of a class.
Simplicity also shows itself reflected in cost.
Most 2 Tier brokers are freely available with various degrees of housekeeping and can be written for specialized situations with relatively few lines of code. The 2 Tier approach benefits from the ability to easily distribute the brokering task between as well as within application components. The broker in a 3 Tier structure is typically a single process or server and relies on a centralized location for broker management. In a monolithic broker, the same functionality is either absent or obtained through complex algorithms and non-intuitive parameter settings. A single failure in 3 Tier broker process can lock all application components that rely on it.