Basic implementation of ContextFactory