Second implementation of SessionFactory, which be constructed via a
ContextProvider.