code: public static Pool createPool(String type, ConnectionManager cm, PoolConfiguration pc)
     {
        if (type == null || type.equals(""))
           return new DefaultPool(cm, pc);
  
        type = type.toLowerCase(Locale.US);
        
        switch (type)
        {
           case "default":
              return new DefaultPool(cm, pc);
           case "stable":
              return new StablePool(cm, pc);
           default:
           {
              Class<? extends Pool> clz = customPoolTypes.get(type);
  
              if (clz == null)
                 throw new RuntimeException(type + " can not be found");
  
              try
              {
                 Constructor constructor = clz.getConstructor(ConnectionManager.class, PoolConfiguration.class);
                 return (Pool)constructor.newInstance(cm, pc);
              }
              catch (Exception e)
              {
                 throw new RuntimeException(type + " can not be created", e);
              }
           }
        }
     }
docs: Create a pool
  @param type The type
  @param cm The connection manager
  @param pc The pool configuration
  @return The pool