title: Flyweight design pattern to create a pool of shared objects
body: <p>I'm trying to understand how a <strong>Flyweight design</strong> pattern is used effectively to <strong>create a pool of shared objects</strong>. The requirement came into picture is due to the performance improvement checklist of a Java EE web based application.</p>
  
  <p>For complex objects that are used frequently, Im considering a pool of recyclable objcts rather than always instantiating new ones.</p>
  
  <p>Please let me now how flyweight design pattern can be used to create  pool of valuable system resources like 
  - threads
  - database connections
  - socket connections etc.</p>