[
https://issues.apache.org/jira/browse/CMIS-1082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16957216#comment-16957216
]
Florent Guillaume commented on CMIS-1082:
-----------------------------------------
Unrelated to CMIS: are you sure that {{LWPCookieJar}} allows you to share the
file between several processes? I doubt that's the case, and I don't see
anything in the doc about this.
> error in clustered deplomentos, cmislib doesn't use Alfresco JSESSION cookies
> -----------------------------------------------------------------------------
>
> Key: CMIS-1082
> URL: https://issues.apache.org/jira/browse/CMIS-1082
> Project: Chemistry
> Issue Type: Improvement
> Components: python-cmislib
> Affects Versions: cmislib 0.6.0
> Environment: Alfresco Enterprise 5.2.4, two repo nodes, same DB, one
> SOLR deployment.
> Reporter: Ernesto Revilla
> Priority: Major
>
> When using clustered deployments, 404 errors can appear when load balancer is
> only configured to use sticky sessions based on JSESSIONID cookie.
>
> It would be good to have cmislib to support cookies.
> For 0.5.1 I could use a cookiejar in {{cmislib/net.py}}, like this:
>
> {{
> from cookielib import LWPCookieJar
> from urllib2 import HTTPCookieProcessor
> ...
> class RESTService(object):
> ...
> def __init__(self):
> ...
> cookiejar = LWPCookieJar('/tmp/alfresco-cookies.txt')
> try:
> cokiejar.load(ignore_discard=True, ignore_expires=True)
> except IOError:
> pass}}
> self.cookiejar = cookiejar
> def get(self,
> ...
> opener = build_opener(SmartRedirectHandler(),
> DefaultErrorHandler(),
> ContextualBasicAuthHandler(passwordManager),
> HTTPCookieProcessor(self.cookiejar))
> res = opener.open(request)
> self.cookiejar.save(ignore_discard=True, ignore_expires=False)
> return res
> }}
>
> I use a file as cookiejar because I have to share the cookies between several
> processes.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)