changed all examples in documentation, so they use try-with-resource blocks to control connections.