Added optional java environment and extract db provisioning to the commons.