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

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


        return persistedObjects;
    }

    @Override
    public PersistenceSession createPersistenceSession() {
        final PersistenceSession persistenceSession = super.createPersistenceSession();
        if (persistedObjects != null) {
            final OidGenerator oidGenerator = persistenceSession.getOidGenerator();
            if (oidGenerator instanceof SimpleOidGenerator) {
                final SimpleOidGenerator simpleOidGenerator = (SimpleOidGenerator) oidGenerator;
                simpleOidGenerator.resetTo(persistedObjects.getOidGeneratorMemento());
            }
        }
View Full Code Here


        userProfileLoader.shutdown();
    }

    @Override
    public IsisSession openSession(final AuthenticationSession authenticationSession) {
        final PersistenceSession persistenceSession = persistenceSessionFactory.createPersistenceSession();
        ensureThatArg(persistenceSession, is(not(nullValue())));

        final UserProfile userProfile = userProfileLoader.getProfile(authenticationSession);
        ensureThatArg(userProfile, is(not(nullValue())));
View Full Code Here

        servicesInjector.setContainer(container);
        servicesInjector.setServices(serviceList);
        persistenceSessionFactory.getSpecificationLoader().injectInto(runtimeContext);

        PersistenceSession persistenceSession = createPersistenceSession(persistenceSessionFactory, adapterManager, adapterFactory, objectFactory, oidGenerator, servicesInjector);

        if (getConfiguration().getBoolean(LOGGING_PROPERTY, false)) {
            final String level = getConfiguration().getString(LOGGING_PROPERTY + ".level", "debug");
            persistenceSession = new PersistenceSessionLogger(persistenceSession, level);
        }
View Full Code Here

            LOG.info("error " + errorRef);
            LOG.debug(e.getMessage(), e);

            prepareErrorDetails(e, context, errorRef, servletPath);

            final PersistenceSession checkSession = IsisContext.getPersistenceSession();
            final IsisTransactionManager transactionManager = checkSession.getTransactionManager();
            if (transactionManager.getTransaction() != null && transactionManager.getTransaction().getState().canAbort()) {
                transactionManager.abortTransaction();
                transactionManager.startTransaction();
            }
View Full Code Here

        userProfileLoader.shutdown();
    }

    @Override
    public IsisSession openSession(final AuthenticationSession authenticationSession) {
        final PersistenceSession persistenceSession = persistenceSessionFactory.createPersistenceSession();
        ensureThatArg(persistenceSession, is(not(nullValue())));

        final UserProfile userProfile = userProfileLoader.getProfile(authenticationSession);
        ensureThatArg(userProfile, is(not(nullValue())));
View Full Code Here

        servicesInjector.setContainer(container);
        servicesInjector.setServices(serviceList);
        persistenceSessionFactory.getSpecificationLoader().injectInto(runtimeContext);

        PersistenceSession persistenceSession =
            createPersistenceSession(persistenceSessionFactory, adapterManager, adapterFactory, objectFactory,
                oidGenerator, servicesInjector);

        if (getConfiguration().getBoolean(LOGGING_PROPERTY, false)) {
            final String level = getConfiguration().getString(LOGGING_PROPERTY + ".level", "debug");
View Full Code Here

        return persistedObjects;
    }

    @Override
    public PersistenceSession createPersistenceSession() {
        final PersistenceSession persistenceSession = super.createPersistenceSession();
        if (persistedObjects != null) {
            final OidGenerator oidGenerator = persistenceSession.getOidGenerator();
            if (oidGenerator instanceof SimpleOidGenerator) {
                final SimpleOidGenerator simpleOidGenerator = (SimpleOidGenerator) oidGenerator;
                simpleOidGenerator.resetTo(persistedObjects.getOidGeneratorMemento());
            }
        }
View Full Code Here

            LOG.info("error " + errorRef);
            LOG.debug(e.getMessage(), e);

            prepareErrorDetails(e, context, errorRef, servletPath);

            final PersistenceSession checkSession = IsisContext.getPersistenceSession();
            final IsisTransactionManager transactionManager = checkSession.getTransactionManager();
            if (transactionManager.getTransaction() != null
                && transactionManager.getTransaction().getState().canAbort()) {
                transactionManager.abortTransaction();
                transactionManager.startTransaction();
            }
View Full Code Here

TOP

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

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.