{"action":"created","issue":{"url":"https://api.github.com/repos/fizzed/rocker/issues/31","repository_url":"https://api.github.com/repos/fizzed/rocker","labels_url":"https://api.github.com/repos/fizzed/rocker/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/fizzed/rocker/issues/31/comments","events_url":"https://api.github.com/repos/fizzed/rocker/issues/31/events","html_url":"https://github.com/fizzed/rocker/issues/31","id":165461444,"number":31,"title":"Improve Rocker.template() for more complex classloading environments","user":{"login":"alkemist","id":17825,"avatar_url":"https://avatars.githubusercontent.com/u/17825?v=3","gravatar_id":"","url":"https://api.github.com/users/alkemist","html_url":"https://github.com/alkemist","followers_url":"https://api.github.com/users/alkemist/followers","following_url":"https://api.github.com/users/alkemist/following{/other_user}","gists_url":"https://api.github.com/users/alkemist/gists{/gist_id}","starred_url":"https://api.github.com/users/alkemist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alkemist/subscriptions","organizations_url":"https://api.github.com/users/alkemist/orgs","repos_url":"https://api.github.com/users/alkemist/repos","events_url":"https://api.github.com/users/alkemist/events{/privacy}","received_events_url":"https://api.github.com/users/alkemist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-14T02:15:21Z","updated_at":"2016-07-15T20:53:31Z","closed_at":null,"body":"This method effectively loads templates via: https://github.com/alkemist/rocker/blob/69881f8863d2f3adcebeea6a308b326b588e5f87/runtime/src/main/java/com/fizzed/rocker/runtime/DefaultRockerBootstrap.java#L99-L99\r\n\r\nThis assumes that the classloader that loaded the Rocker runtime can see the target class.\r\n\r\nTwo (non mutually exclusive) potential options:\r\n\r\n1. Change `DefaultRockerBootstrap.model()` to use `Thread.currentThread().getContextClassLoader()`\r\n2. Add a `Rocker.template()` variant that takes a classloader\r\n\r\nI think it probably makes sense to do both. In most environments where classloading is complex, the context classloader is set to something with good general visibility. Option (2) is potentially useful for even more complex environments. I'd probably be tempted to just do (1) though, and see if anyone ever needs (2)."},"comment":{"url":"https://api.github.com/repos/fizzed/rocker/issues/comments/233067140","html_url":"https://github.com/fizzed/rocker/issues/31#issuecomment-233067140","issue_url":"https://api.github.com/repos/fizzed/rocker/issues/31","id":233067140,"user":{"login":"jjlauer","id":585730,"avatar_url":"https://avatars.githubusercontent.com/u/585730?v=3","gravatar_id":"","url":"https://api.github.com/users/jjlauer","html_url":"https://github.com/jjlauer","followers_url":"https://api.github.com/users/jjlauer/followers","following_url":"https://api.github.com/users/jjlauer/following{/other_user}","gists_url":"https://api.github.com/users/jjlauer/gists{/gist_id}","starred_url":"https://api.github.com/users/jjlauer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjlauer/subscriptions","organizations_url":"https://api.github.com/users/jjlauer/orgs","repos_url":"https://api.github.com/users/jjlauer/repos","events_url":"https://api.github.com/users/jjlauer/events{/privacy}","received_events_url":"https://api.github.com/users/jjlauer/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T20:53:31Z","updated_at":"2016-07-15T20:53:31Z","body":"You've submitted a couple classloader PRs, but perhaps it'd be good to try and create unit tests to verify all this.  Running under maven, tomcat, gradle, etc. introduce all sorts of interesting classloader issues and it'd be good to have some coverage of what you're attempting to solve.  I'm supportive of your effort to let you passthru the classloader, but I'd love your help making sure we don't regress in future versions."}}
{"actor":{"display_login":"jjlauer"}}