Do not differenciate manually registered and automatically registered factories
Do not expect a Null value but an exception is something went wrong
Allow getConnection to be overridden
Fix indentation
Add missing documentation