Search in sources :

Example 1 with JCASessionHandle

use of org.apache.jackrabbit.jca.JCASessionHandle in project jackrabbit by apache.

the class ConnectionFactoryTest method testAllocation.

/**
     * Test the connection factory allocation.
     */
public void testAllocation() throws Exception {
    // Create the connection factory
    Object cf = mcf.createConnectionFactory();
    assertTrue(cf instanceof JCARepositoryHandle);
    Repository repository = (Repository) cf;
    // Open a new session
    Session session = repository.login(JCR_SUPERUSER);
    assertTrue(session != null);
    assertTrue(session instanceof JCASessionHandle);
    // Logout session
    session.logout();
}
Also used : Repository(javax.jcr.Repository) JCARepositoryHandle(org.apache.jackrabbit.jca.JCARepositoryHandle) JCASessionHandle(org.apache.jackrabbit.jca.JCASessionHandle) Session(javax.jcr.Session)

Aggregations

Repository (javax.jcr.Repository)1 Session (javax.jcr.Session)1 JCARepositoryHandle (org.apache.jackrabbit.jca.JCARepositoryHandle)1 JCASessionHandle (org.apache.jackrabbit.jca.JCASessionHandle)1