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
沒有留言:
張貼留言
留個話吧:)