Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Manage Apache HTTP and Jersey HTTP clients #1061
In the documentation we say that we create managed instances of Apache HTTP client. But in the fact, it's not true.
To follow this contract, we should tie the lifecyle of the client to the lifecycle of the server, if the user specified the environment in the builder. The rationale is the same for Jersey HTTP client.
If the user has already created own managed object for the client - it's not an issue, because the close method of the HTTP client is idempotent.