This project has retired. For details please refer to its Attic page.
Apache Chemistry - Connecting to a repository

Connecting to a repository

In order to connect to a CMIS repository you have to create a session.

A few repositories need special treatment.

Using Cookies

Some repositories are sending HTTP cookies to maintain state (although CMIS is stateless) or to accelerate authentication for subsequent calls. OpenCMIS ignores these cookies by default.

OpenCMIS 0.4.0 and earlier

The following code snippet activates cookies for your application and OpenCMIS. See this page for details. Note, that all OpenCMIS sessions share the same set of cookies.

    CookieManager cm = new CookieManager(null, CookiePolicy.ACCEPT_ALL);

If each session has to manage a separate set of cookies, a custom authentication provider is required.

OpenCMIS 0.5.0 and later

OpenCMIS has per-session cookie support. It can be activated by setting the session parameter COOKIES to "true".