Examples of IsisSessionFactory


Examples of org.apache.isis.core.runtime.system.session.IsisSessionFactory

   
    @Before
    public void setup() throws Exception {
        org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
        service = new TestServiceObject1();
        final IsisSessionFactory executionContextFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, new IsisConfigurationDefault(), mockSpecificationLoader, mockTemplateImageLoader, mockAuthenticationManager,
                mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, mockContainer, Arrays.<Object>asList(service), new OidMarshaller());

        IsisContextStatic.createRelaxedInstance(executionContextFactory);

        final XMLReader parser = XMLReaderFactory.createXMLReader();
View Full Code Here

Examples of org.apache.isis.core.runtime.system.session.IsisSessionFactory

        context.ignoring(mockTemplateImageLoader, mockSpecificationLoader, mockUserProfileLoader, mockPersistenceSessionFactory, mockAuthenticationManager, mockAuthorizationManager, mockContainer);

        TestToolkit.createInstance();

        final IsisConfigurationDefault configuration = new IsisConfigurationDefault();
        final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockSpecificationLoader, mockTemplateImageLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, mockContainer, Collections.emptyList(), new OidMarshaller());
        sessionFactory.init();
        IsisContextStatic.createRelaxedInstance(sessionFactory);
    }
View Full Code Here

Examples of org.apache.isis.core.runtime.system.session.IsisSessionFactory

    public void setUp() throws Exception {
        org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);

        context.ignoring(mockTemplateImageLoader, mockSpecificationLoader, mockUserProfileLoader, mockPersistenceSessionFactory, mockAuthenticationManager, mockAuthorizationManager, mockContainer);

        final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, new IsisConfigurationDefault(), mockSpecificationLoader, mockTemplateImageLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory,
            mockContainer, Collections.emptyList(), new OidMarshaller());
        sessionFactory.init();
        IsisContextStatic.createRelaxedInstance(sessionFactory);

        final TextBlockTarget target = new TextBlockTargetExample();

        content = new TextContent(target, 4, TextContent.WRAPPING);
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.session.IsisSessionFactory

        reflector.setRuntimeContext(new RuntimeContextFromSession());

        IsisContext.setConfiguration(configuration);

        final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, reflector, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
        IsisContextStatic.createRelaxedInstance(sessionFactory);
        sessionFactory.init();

        session = new TestProxySession();
        IsisContext.openSession(session);
    }
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.session.IsisSessionFactory

        Logger.getRootLogger().setLevel(Level.OFF);
        final Mockery mockery = new JUnit4Mockery();
        final ArrayList<Object> servicesList = new ArrayList<Object>();
        service = new TestServiceObject1();
        servicesList.add(service);
        final IsisSessionFactory executionContextFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, new IsisConfigurationDefault(), mockery.mock(TemplateImageLoader.class), mockery.mock(SpecificationLoader.class), mockery.mock(AuthenticationManager.class),
                mockery.mock(AuthorizationManager.class), mockery.mock(UserProfileLoader.class), mockery.mock(PersistenceSessionFactory.class), servicesList);

        IsisContextStatic.createRelaxedInstance(executionContextFactory);

        final XMLReader parser = XMLReaderFactory.createXMLReader();
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.session.IsisSessionFactory

    }

    public void init() {
        reflector.setRuntimeContext(new RuntimeContextFromSession());

        final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, noopTemplateImageLoader, reflector, authenticationManager, authorizationManager, userProfileLoader, persistenceSessionFactory, servicesList);

        persistenceSession.setSpecificationLoader(reflector);
        // this implementation of persistenceSession will automatically inject
        // its own transaction manager into itself.

        sessionFactory.init();
        context = IsisContextStatic.createRelaxedInstance(sessionFactory);

        // commented out cos think now redundant since calling
        // openExecutionContext below
        // persistor.open();
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.session.IsisSessionFactory

        // Persistence Session
        // final ObjectReflector reflector =
        // mockery.mock(ObjectReflector.class);
        // final PersistenceSession mockPersistenceSession =
        // mockery.mock(PersistenceSession.class);
        final IsisSessionFactory sessionFactory = mockery.mock(IsisSessionFactory.class);
        // final AuthenticationSession mockSession =
        // mockery.mock(AuthenticationSession.class);
        // final IsisSession session = mockery.mock(IsisSession.class);
        // final AdapterManager mockAdapterManager =
        // mockery.mock(AdapterManager.class);
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.session.IsisSessionFactory

        // Persistence Session
        // final ObjectReflector reflector =
        // mockery.mock(ObjectReflector.class);
        // final PersistenceSession mockPersistenceSession =
        // mockery.mock(PersistenceSession.class);
        final IsisSessionFactory sessionFactory = mockery.mock(IsisSessionFactory.class);
        // final AuthenticationSession mockSession =
        // mockery.mock(AuthenticationSession.class);
        // final IsisSession session = mockery.mock(IsisSession.class);
        // final AdapterManager mockAdapterManager =
        // mockery.mock(AdapterManager.class);
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.session.IsisSessionFactory

        reflector.init();

        // not sure if this is needed since we have now moved Reflector out to
        // global scope,
        // not specific to an ExecutionContext.
        final IsisSessionFactory executionContextFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, configuration, mockTemplateImageLoader, reflector, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory, servicesList);
        IsisContextStatic.createRelaxedInstance(executionContextFactory);
        IsisContextStatic.getInstance().getSessionInstance(); // cause an
                                                              // Execution
                                                              // Context to load
View Full Code Here

Examples of org.apache.isis.runtimes.dflt.runtime.system.session.IsisSessionFactory

                ignoring(mockTransaction);
            }
        });

        final IsisSessionFactory sessionFactory = new IsisSessionFactoryDefault(DeploymentType.EXPLORATION, new IsisConfigurationDefault(), mockTemplateImageLoader, mockSpecificationLoader, mockAuthenticationManager, mockAuthorizationManager, mockUserProfileLoader, mockPersistenceSessionFactory,
                servicesList);
        sessionFactory.init();
        IsisContextStatic.createRelaxedInstance(sessionFactory);

        IsisContext.openSession(new ExplorationSession());

        notifier = new ExposedViewUpdateNotifier();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.