Package org.apache.jackrabbit.core

Examples of org.apache.jackrabbit.core.SessionImpl.createSession()


        }

        SessionImpl sImpl = (SessionImpl) superuser;
        Subject subject = sImpl.getSubject();

        Session s1 = sImpl.createSession(currentWsp);
        try {
            assertFalse(s1 == sImpl);
            assertFalse(subject == ((SessionImpl) s1).getSubject());
            assertEquals(subject, ((SessionImpl) s1).getSubject());
            assertEquals(currentWsp, s1.getWorkspace().getName());
View Full Code Here


            s1.logout();
            assertFalse(subject.getPrincipals().isEmpty());
        }


        Session s2 = sImpl.createSession(otherWsp);
        try {
            assertFalse(s2 == sImpl);
            assertFalse(subject == ((SessionImpl) s2).getSubject());
            assertEquals(subject, ((SessionImpl) s2).getSubject());
            assertEquals(otherWsp, s2.getWorkspace().getName());
View Full Code Here

        } finally {
            s2.logout();
            assertFalse(subject.getPrincipals().isEmpty());
        }

        Session s3 = sImpl.createSession(null);
        try {
            assertFalse(s3 == sImpl);
            assertFalse(subject == ((SessionImpl) s3).getSubject());
            assertEquals(subject, ((SessionImpl) s3).getSubject());
            assertEquals(((RepositoryImpl) sImpl.getRepository()).getConfig().getDefaultWorkspaceName(), s3.getWorkspace().getName());
View Full Code Here

        }

        SessionImpl sImpl = (SessionImpl) superuser;
        Subject subject = sImpl.getSubject();

        Session s1 = sImpl.createSession(currentWsp);
        try {
            assertFalse(s1 == sImpl);
            assertFalse(subject == ((SessionImpl) s1).getSubject());
            assertEquals(subject, ((SessionImpl) s1).getSubject());
            assertEquals(currentWsp, s1.getWorkspace().getName());
View Full Code Here

            assertFalse(subject.getPrincipals().isEmpty());
            assertFalse(subject.getPublicCredentials().isEmpty());
        }


        Session s2 = sImpl.createSession(otherWsp);
        try {
            assertFalse(s2 == sImpl);
            assertFalse(subject == ((SessionImpl) s2).getSubject());
            assertEquals(subject, ((SessionImpl) s2).getSubject());
            assertEquals(otherWsp, s2.getWorkspace().getName());
View Full Code Here

            s2.logout();
            assertFalse(subject.getPrincipals().isEmpty());
            assertFalse(subject.getPublicCredentials().isEmpty());
        }

        Session s3 = sImpl.createSession(null);
        try {
            assertFalse(s3 == sImpl);
            assertFalse(subject == ((SessionImpl) s3).getSubject());
            assertEquals(subject, ((SessionImpl) s3).getSubject());
            assertEquals(((RepositoryImpl) sImpl.getRepository()).getConfig().getDefaultWorkspaceName(), s3.getWorkspace().getName());
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.