I'm using TransferManager to upload a file to my s3 bucket. While the documentation says to reuse one instance wherever possible, it also says that shutdown should be called once the transfer is complete.
Relevant portion of the docs:
TransferManager is responsible for managing resources such as connections and threads; share a single instance of TransferManager whenever possible. TransferManager, like all the client classes in the AWS SDK for Java, is thread safe. Call TransferManager.shutdownNow() to release the resources once the transfer is complete.
Is this to be taken literally, or can we reuse the object and call shutdown when the application is closed?
A bit of background: We were earlier using the same s3 client to create one TransactionManager per upload, but we started getting AbortedException
thrown on some of the uploads.