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

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


        // A war with a maxInactive of 30 mins maxUnreplicated of 0
        this.startManagers(warname, 1800, 1);

        assertTrue(managers[0].getNotificationPolicy() instanceof MockClusteredSessionNotificationPolicy);
        MockClusteredSessionNotificationPolicy mcsnp0 = (MockClusteredSessionNotificationPolicy) managers[0].getNotificationPolicy();
        assertNotNull("capability set", mcsnp0.getClusteredSessionNotificationCapability());
        mcsnp0.setResponse(notify);

        assertTrue(managers[1].getNotificationPolicy() instanceof MockClusteredSessionNotificationPolicy);
        MockClusteredSessionNotificationPolicy mcsnp1 = (MockClusteredSessionNotificationPolicy) managers[1].getNotificationPolicy();
        assertNotNull("capability set", mcsnp1.getClusteredSessionNotificationCapability());
        mcsnp1.setResponse(notify);

        MockHttpSessionListener hsl0 = new MockHttpSessionListener();
        MockHttpSessionAttributeListener hsal0 = new MockHttpSessionAttributeListener();
        Context ctx = (Context) managers[0].getContainer();
        ctx.setApplicationSessionLifecycleListeners(new Object[] { hsl0 });
View Full Code Here


        // A war with a maxInactive of 2 secs and a maxIdle of 1
        this.startManagers(warname, 2, 1);

        assertTrue(managers[0].getNotificationPolicy() instanceof MockClusteredSessionNotificationPolicy);
        MockClusteredSessionNotificationPolicy mcsnp0 = (MockClusteredSessionNotificationPolicy) managers[0]
                .getNotificationPolicy();
        assertNotNull("capability set", mcsnp0.getClusteredSessionNotificationCapability());
        mcsnp0.setResponse(notify);

        assertTrue(managers[1].getNotificationPolicy() instanceof MockClusteredSessionNotificationPolicy);
        MockClusteredSessionNotificationPolicy mcsnp1 = (MockClusteredSessionNotificationPolicy) managers[1]
                .getNotificationPolicy();
        assertNotNull("capability set", mcsnp1.getClusteredSessionNotificationCapability());
        mcsnp1.setResponse(notify);

        MockHttpSessionListener hsl0 = new MockHttpSessionListener();
        MockHttpSessionAttributeListener hsal0 = new MockHttpSessionAttributeListener();
        Context ctx = (Context) managers[0].getContainer();
        ctx.setApplicationSessionLifecycleListeners(new Object[] { hsl0 });
View Full Code Here

        // A war with a maxInactive of 30 mins and no maxIdle
        this.startManagers(warname, 1800, -1);

        assertTrue(managers[0].getNotificationPolicy() instanceof MockClusteredSessionNotificationPolicy);
        MockClusteredSessionNotificationPolicy mcsnp0 = (MockClusteredSessionNotificationPolicy) managers[0]
                .getNotificationPolicy();
        assertNotNull("capability set", mcsnp0.getClusteredSessionNotificationCapability());
        mcsnp0.setResponse(notify);

        assertTrue(managers[1].getNotificationPolicy() instanceof MockClusteredSessionNotificationPolicy);
        MockClusteredSessionNotificationPolicy mcsnp1 = (MockClusteredSessionNotificationPolicy) managers[1]
                .getNotificationPolicy();
        assertNotNull("capability set", mcsnp1.getClusteredSessionNotificationCapability());
        mcsnp1.setResponse(notify);

        MockHttpSessionListener hsl0 = new MockHttpSessionListener();
        MockHttpSessionAttributeListener hsal0 = new MockHttpSessionAttributeListener();
        Context ctx = (Context) managers[0].getContainer();
        ctx.setApplicationSessionLifecycleListeners(new Object[] { hsl0 });
View Full Code Here

TOP

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

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.