星期四, 12月 16, 2010

[Alfresco WebService]Ticket could not be found when calling callback handler

三種解法Aflreso Webserver login後Ticket有時候會無法正常取得的方法:

1 - start new session for for every separate thread.
2 - store authenticationDetails in the user's session, and use it to call the webservice

登入後使用session keep AuthenticationDetails 物件
AuthenticationUtils.startSession("user", "password");
    request.getSession().setAttribute("authenticationDetails", AuthenticationUtils.getAuthenticationDetails());
每次呼叫WebService時,把session中的AuthenticationDetails在設定回去
AuthenticationUtils.setAuthenticationDetails((AuthenticationDetails) req.getSession().getAttribute("authenticationDetails"));
Node[] nodes = repositoryService.get(new Predicate(null,spacesStore, qt));

3 - Modify AuthenticationUtils to store authenticationDetails in session instead of ThreadLocal, rebuild the SDK.

Reference:
Ticket could not be found when calling callback handler

沒有留言:

張貼留言

留個話吧:)

其他你感興趣的文章

Related Posts with Thumbnails