O'Reilly logo

Alfresco CMIS by Martin Bergljung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connecting and setting up a session with the repository

Before we start working with the repository, we must first create a session and connect to it. In the CmisClient class, add the following Hash map that will contain active sessions:

public class CmisClient {
  private static Log logger = LogFactory.getLog(CmisClient.class);
  private static Map<String, Session> connections = new 
    ConcurrentHashMap<String, Session>();
  public CmisClient() {    }
}

The Session interface is from the org.apache.chemistry.opencmis.client.api package in the OpenCMIS library. It represents a session/connection for a specific user with the CMIS repository. A session holds the configuration settings and cache settings to use across multiple calls to the repository. The session ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required