Replace hardcoding with variable dbUrl
Include plain text password as comment.
Minor refactor.
Refactor to use proper transactional boundaries and lifecycle management.
Default to localhost if null value.