When it comes to Connections it is best to hold them open as long as possible as they can be expensive to create.
I would suggest asking this question in the “Flow and Java Services” forum as they will be able to answer best practices for flow services.