In my MVC web application, my services rely on the
private static final Client client = ClientBuilder.newClient();
If you define it as a
Singleton in some fashion then you don't really need to - it lives and dies with your application. Sometimes, you might define a Client instance for a specific short- or medium-term need (say you have an application which speaks to multiple remote endpoints which change during the lifetime of the application). In those cases it would be best to explicitly close the Client 'at some point' to make it clear that it's not intended for reuse. The tricky part might be defining what 'at some point' really means.