Search code examples
javaalfrescoalfresco-shareopencmis

What is the ideal session timeout for chemistry opencmis session for Alfresco?


I am implementing a thread based application where i will be connecting to Alfresco continuously. I want to avoid a session timeout error so wanted to know at what interval should i clear the session or create a new one. And how long can i continue with the same instance of the session with me.


Solution

  • If you check the repository.properties you'll find the following property

    # If authentication.ticket.ticketsExpire is true and
    # authentication.ticket.expiryMode is AFTER_FIXED_TIME or AFTER_INACTIVITY,
    # this controls the minimum period for which tickets are valid. 
    # The default is PT1H for one hour.
    authentication.ticket.validDuration=PT1H
    

    You can change this session to whatever you want, but it will be applied globally. I've max upped this to 24 hours, so you can decide for yourself.

    The other way is implementing a pooling method with get's a new ticket after every hour.