Refactor connection creation into helper method
Refresh pool connection if an exception occurred