Package org.apache.isis.runtimes.dflt.runtime.system.persistence

Examples of org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSessionFactory


        ((ObjectReflectorDefault) mockSpecificationLoader).setRuntimeContext(new RuntimeContextFromSession());

        final InMemoryPersistenceMechanismInstaller persistenceMechanismInstaller = new InMemoryPersistenceMechanismInstaller();
        persistenceMechanismInstaller.setConfiguration(configuration);
        final PersistenceSessionFactory mockPersistenceSessionFactory = persistenceMechanismInstaller.createPersistenceSessionFactory(DeploymentType.PROTOTYPE);

        // mockPersistenceSessionFactory.init();

        final IsisSessionFactoryDefault sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
        final IsisContext context = IsisContextStatic.createRelaxedInstance(sessionFactory);
View Full Code Here


        installer = new XmlPersistenceMechanismInstaller();
    }

    @Test
    public void testCreatePersistenceSessionFactory() throws Exception {
        final PersistenceSessionFactory factory = installer.createPersistenceSessionFactory(deploymentType);
        assertTrue(factory != null);
    }
View Full Code Here

    /**
     * Downcasts the {@link PersistenceSessionFactory} to
     * {@link InMemoryPersistenceSessionFactory}.
     */
    protected InMemoryPersistenceSessionFactory getInMemoryPersistenceSessionFactory() {
        final PersistenceSessionFactory persistenceSessionFactory = getPersistenceSession().getPersistenceSessionFactory();

        if (!(persistenceSessionFactory instanceof InMemoryPersistenceSessionFactory)) {
            // for testing support
            return null;
        }
View Full Code Here

        } else {
            persistenceMechanismInstaller = new SqlPersistorInstaller();
        }

        persistenceMechanismInstaller.setConfiguration(configuration);
        final PersistenceSessionFactory persistenceSessionFactory = persistenceMechanismInstaller.createPersistenceSessionFactory(DeploymentType.PROTOTYPE);

        sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, persistenceSessionFactory, servicesList);
        context = IsisContextStatic.createRelaxedInstance(sessionFactory);
        IsisContext.setConfiguration(sessionFactory.getConfiguration());
        sessionFactory.init();
View Full Code Here

    // Create context hooks
    // ///////////////////////////////////////////

    @Override
    public IsisSessionFactory doCreateSessionFactory(final DeploymentType deploymentType) throws IsisSystemException {
        final PersistenceSessionFactory persistenceSessionFactory = obtainPersistenceSessionFactory(deploymentType);
        final UserProfileLoader userProfileLoader = new UserProfileLoaderDefault(obtainUserProfileStore());
        return createSessionFactory(deploymentType, userProfileLoader, persistenceSessionFactory);
    }
View Full Code Here

     *
     * @see FixturesInstalledFlag
     */
    @Override
    public boolean isFixturesInstalled() {
        final PersistenceSessionFactory persistenceSessionFactory = getPersistenceSessionFactory();
        if (persistenceSessionFactory instanceof FixturesInstalledFlag) {
            final FixturesInstalledFlag fixturesInstalledFlag = (FixturesInstalledFlag) persistenceSessionFactory;
            if (fixturesInstalledFlag.isFixturesInstalled() == null) {
                fixturesInstalledFlag.setFixturesInstalled(objectStore.isFixturesInstalled());
            }
View Full Code Here

        ((ObjectReflectorDefault) mockSpecificationLoader).setRuntimeContext(new RuntimeContextFromSession());

        final InMemoryPersistenceMechanismInstaller persistenceMechanismInstaller =
            new InMemoryPersistenceMechanismInstaller();
        persistenceMechanismInstaller.setConfiguration(configuration);
        final PersistenceSessionFactory mockPersistenceSessionFactory =
            persistenceMechanismInstaller.createPersistenceSessionFactory(DeploymentType.PROTOTYPE);

        // mockPersistenceSessionFactory.init();

        final IsisSessionFactoryDefault sessionFactory =
View Full Code Here

    /**
     * Downcasts the {@link PersistenceSessionFactory} to {@link InMemoryPersistenceSessionFactory}.
     */
    protected InMemoryPersistenceSessionFactory getInMemoryPersistenceSessionFactory() {
        final PersistenceSessionFactory persistenceSessionFactory =
            getPersistenceSession().getPersistenceSessionFactory();

        if (!(persistenceSessionFactory instanceof InMemoryPersistenceSessionFactory)) {
            // for testing support
            return null;
View Full Code Here

    // Create context hooks
    // ///////////////////////////////////////////

    @Override
    public IsisSessionFactory doCreateSessionFactory(final DeploymentType deploymentType) throws IsisSystemException {
        final PersistenceSessionFactory persistenceSessionFactory = obtainPersistenceSessionFactory(deploymentType);
        final UserProfileLoader userProfileLoader = new UserProfileLoaderDefault(obtainUserProfileStore());
        return createSessionFactory(deploymentType, userProfileLoader, persistenceSessionFactory);
    }
View Full Code Here

        } else {
            persistenceMechanismInstaller = new SqlPersistorInstaller();
        }

        persistenceMechanismInstaller.setConfiguration(configuration);
        final PersistenceSessionFactory persistenceSessionFactory =
            persistenceMechanismInstaller.createPersistenceSessionFactory(DeploymentType.PROTOTYPE);

        sessionFactory =
            new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader,
                mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader,
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.runtime.system.persistence.PersistenceSessionFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.