8 comments posted · 6 followers · following 0
But you're right, in the previous example it was using the singleton model, and you'd have only one single instance shared globally. While that might sound great at first, it's actually inflexible and somewhat dangerous. For example, imagine you were using a single global instance and someone unknowingly called HttpClient.getClientConnectionManager().shutdown(). Or if you needed multiple HttpClient instances because they each required different settings, in the SchemeRegistry or what not.