Package org.jboss.as.web.session.mocks

Examples of org.jboss.as.web.session.mocks.MockHost


        factory.getLockManagerInjector().inject(((ExtendedCacheManager) cacheContainer).getLockManager());
       
        Engine engine = new MockEngine();
        engine.setName("jboss.web");
        engine.setJvmRoute(jvmRoute);
        Host host = new MockHost();
        host.setName("localhost");
        engine.addChild(host);
        StandardContext context = new StandardContext();
        context.setName(warName);
        context.setDomain(jvmRoute);
        host.addChild(context);

        try {
            DistributableSessionManager<OutgoingDistributableSessionData> manager = new DistributableSessionManager<OutgoingDistributableSessionData>(factory, context, metaData, new ContextClassResolver()) {
                @Override
                public void start() throws LifecycleException {
View Full Code Here


     */
    @Test
    public void testNewSessionIsOutdated() throws Exception {
        Engine engine = new MockEngine();
        engine.setName("jboss.web");
        Host host = new MockHost();
        host.setName("localhost");
        engine.addChild(host);
        StandardContext context = new StandardContext();
        context.setName("test");
        host.addChild(context);
       
        DistributableSessionManager<?> mgr = new DistributableSessionManager<OutgoingDistributableSessionData>(new MockDistributedCacheManagerFactory(), context, SessionTestUtil.createWebMetaData(10), new ContextClassResolver());
        context.setManager(mgr);
        mgr.start();

View Full Code Here

    }

    private Context getContext(String contextPath, String cookiePath, String cookieComment, String cookieDomain,
            boolean httpOnly, boolean secure) {
        MockEngine engine = new MockEngine();
        MockHost host = new MockHost();
        host.setName("localhost");
        engine.addChild(host);
        StandardContext container = new StandardContext();
        container.setPath(contextPath);
        host.addChild(container);

        SessionCookie cookie = container.getSessionCookie();
        if (cookiePath != null)
            cookie.setPath(cookiePath);
        if (cookieComment != null)
View Full Code Here

TOP

Related Classes of org.jboss.as.web.session.mocks.MockHost

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.