Share database connection between threads