{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-session/issues/267","labels_url":"https://api.github.com/repos/spring-projects/spring-session/issues/267/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-session/issues/267/comments","events_url":"https://api.github.com/repos/spring-projects/spring-session/issues/267/events","html_url":"https://github.com/spring-projects/spring-session/pull/267","id":101097109,"number":267,"title":"Add SessionContextHolder","user":{"login":"franciscospaeth","id":2634076,"avatar_url":"https://avatars.githubusercontent.com/u/2634076?v=3","gravatar_id":"","url":"https://api.github.com/users/franciscospaeth","html_url":"https://github.com/franciscospaeth","followers_url":"https://api.github.com/users/franciscospaeth/followers","following_url":"https://api.github.com/users/franciscospaeth/following{/other_user}","gists_url":"https://api.github.com/users/franciscospaeth/gists{/gist_id}","starred_url":"https://api.github.com/users/franciscospaeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franciscospaeth/subscriptions","organizations_url":"https://api.github.com/users/franciscospaeth/orgs","repos_url":"https://api.github.com/users/franciscospaeth/repos","events_url":"https://api.github.com/users/franciscospaeth/events{/privacy}","received_events_url":"https://api.github.com/users/franciscospaeth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spring-projects/spring-session/labels/waiting%20for%20feedback","name":"waiting for feedback","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"rwinch","id":362503,"avatar_url":"https://avatars.githubusercontent.com/u/362503?v=3","gravatar_id":"","url":"https://api.github.com/users/rwinch","html_url":"https://github.com/rwinch","followers_url":"https://api.github.com/users/rwinch/followers","following_url":"https://api.github.com/users/rwinch/following{/other_user}","gists_url":"https://api.github.com/users/rwinch/gists{/gist_id}","starred_url":"https://api.github.com/users/rwinch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwinch/subscriptions","organizations_url":"https://api.github.com/users/rwinch/orgs","repos_url":"https://api.github.com/users/rwinch/repos","events_url":"https://api.github.com/users/rwinch/events{/privacy}","received_events_url":"https://api.github.com/users/rwinch/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/spring-projects/spring-session/milestones/3","html_url":"https://github.com/spring-projects/spring-session/milestones/1.1.0%20M1","labels_url":"https://api.github.com/repos/spring-projects/spring-session/milestones/3/labels","id":812767,"number":3,"title":"1.1.0 M1","description":null,"creator":{"login":"rwinch","id":362503,"avatar_url":"https://avatars.githubusercontent.com/u/362503?v=3","gravatar_id":"","url":"https://api.github.com/users/rwinch","html_url":"https://github.com/rwinch","followers_url":"https://api.github.com/users/rwinch/followers","following_url":"https://api.github.com/users/rwinch/following{/other_user}","gists_url":"https://api.github.com/users/rwinch/gists{/gist_id}","starred_url":"https://api.github.com/users/rwinch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwinch/subscriptions","organizations_url":"https://api.github.com/users/rwinch/orgs","repos_url":"https://api.github.com/users/rwinch/repos","events_url":"https://api.github.com/users/rwinch/events{/privacy}","received_events_url":"https://api.github.com/users/rwinch/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":12,"state":"open","created_at":"2014-10-03T15:38:16Z","updated_at":"2015-08-18T17:42:58Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-08-14T20:24:11Z","updated_at":"2015-08-18T20:05:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spring-projects/spring-session/pulls/267","html_url":"https://github.com/spring-projects/spring-session/pull/267","diff_url":"https://github.com/spring-projects/spring-session/pull/267.diff","patch_url":"https://github.com/spring-projects/spring-session/pull/267.patch"},"body":"Implemented SessionContextHolder;\r\nIntroduced SessionContextHolderStrategy;\r\nImplementation of three modes: \r\n* MODE_THREADLOCAL;\r\n* MODE_INHERITABLETHREADLOCAL;\r\n* MODE_GLOBAL. (?)\r\nAdded necessary documentation.\r\n\r\nImplements gh-249"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-session/issues/comments/132334467","html_url":"https://github.com/spring-projects/spring-session/pull/267#issuecomment-132334467","issue_url":"https://api.github.com/repos/spring-projects/spring-session/issues/267","id":132334467,"user":{"login":"franciscospaeth","id":2634076,"avatar_url":"https://avatars.githubusercontent.com/u/2634076?v=3","gravatar_id":"","url":"https://api.github.com/users/franciscospaeth","html_url":"https://github.com/franciscospaeth","followers_url":"https://api.github.com/users/franciscospaeth/followers","following_url":"https://api.github.com/users/franciscospaeth/following{/other_user}","gists_url":"https://api.github.com/users/franciscospaeth/gists{/gist_id}","starred_url":"https://api.github.com/users/franciscospaeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franciscospaeth/subscriptions","organizations_url":"https://api.github.com/users/franciscospaeth/orgs","repos_url":"https://api.github.com/users/franciscospaeth/repos","events_url":"https://api.github.com/users/franciscospaeth/events{/privacy}","received_events_url":"https://api.github.com/users/franciscospaeth/received_events","type":"User","site_admin":false},"created_at":"2015-08-18T20:05:59Z","updated_at":"2015-08-18T20:05:59Z","body":"Hi @rwinch,\r\n\r\nThe changes makes sense :+1:.\r\n\r\nRegarding the inconsistency, this is a real problem.\r\n\r\nAbout the `SessionContext`, it was introduced to abstract the `SessionContextHolder` from the responsible to provide/create the session instance. Within a http request for example, session should be created only if requested. If `SessionContextHolder.getSession()` is implemented, from my point of view, it should do what `HttpServletRequest.getSession()` does, covering the case in which `getSession()` is first invoked from service tier using `SessionContextHolder`.\r\n\r\nI had tried out some things, among them to use `SessionContextHolder` from `ExpiringSessionHttpSession`, but once `SessionContextHolder.getSession()` returns `Session` some ugly unchecked cast to `S` (`<S extends ExpiringSession>`) are required. I will think further about it, but would be happy if there are any ideas/suggestions to solve the problem, maybe I'm just not seeing the big picture."}}