*/
protected final IsisSessionFactory createSessionFactory(final DeploymentType deploymentType, final UserProfileLoader userProfileLoader, final PersistenceSessionFactory persistenceSessionFactory) throws IsisSystemException {
final IsisConfiguration configuration = getConfiguration();
final AuthenticationManager authenticationManager = obtainAuthenticationManager(deploymentType);
final AuthorizationManager authorizationManager = obtainAuthorizationManager(deploymentType);
final TemplateImageLoader templateImageLoader = obtainTemplateImageLoader();
final OidMarshaller oidMarshaller = obtainOidMarshaller();
final Collection<MetaModelRefiner> metaModelRefiners = refiners(authenticationManager, authorizationManager, templateImageLoader, persistenceSessionFactory);
final SpecificationLoaderSpi reflector = obtainSpecificationLoaderSpi(deploymentType, persistenceSessionFactory, metaModelRefiners);