In Chapter 3, Configuring Enterprise Services, we discussed the difference between Stateless Session Beans (SLSBs), Stateful Session Beans (SFSBs), and Singleton Session Beans.
SLSBs are not able to retain state between invocations, so the main benefit of clustering an SLSB is to balance the load between an array of servers:
@Stateless @Clustered public class ClusteredBean { public void doSomething() { // Do something } }
If you want to further specialize your SLSB, then you can choose the load-balancing algorithm used to distribute the load between your EJBs. The following are the available load-balancing policies for your SLSB: