> Now the question:
> 
> How come so many people are keen on introducing SLSBs as a facade in front 
> of Entity Beans to improve the performance? The same code (plus a tid bit 
> extra) needs to be executed, the same pooling behavior is there for the 
> Entity Bean and yes the SLSB introduces little to no overhead, but I still 
> see no gain.
> 
> What benefits am I overlooking?

Then imagine this:

Scenario 1 - No SLSB:

   The logic is implemented in the client program, which resides across
   the network. The client accesses 100 entity beans in performing its
   logic. That means 1000s of network hits to access the beans and invoke
   their methods. Slow network? Really slow client.

Scenario 2 - SLSB:

   The logic is in the Session Bean. The client, which is still across
   the network, makes a single call into the SLSB. The SLSB now accesses
   the same 100 entity beans and still makes 1000s of method calls on
   those beans. HOWEVER, this time, all of that overhead occurs within
   the container, greatly reducing the performance penalty, and allowing
   for some container optimizations. The result is then sent to the client.
   Slow network? Much better performance than Scenario #1.

Make sense now?

tim.


Reply via email to