{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/smarthome/issues/803","repository_url":"https://api.github.com/repos/eclipse/smarthome","labels_url":"https://api.github.com/repos/eclipse/smarthome/issues/803/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/smarthome/issues/803/comments","events_url":"https://api.github.com/repos/eclipse/smarthome/issues/803/events","html_url":"https://github.com/eclipse/smarthome/pull/803","id":124599085,"number":803,"title":"ScriptEngine: Expose ScriptEngine as OSGI-Bundle, ScriptExtension, GlobalScope optimization","user":{"login":"smerschjohann","id":11621401,"avatar_url":"https://avatars.githubusercontent.com/u/11621401?v=3","gravatar_id":"","url":"https://api.github.com/users/smerschjohann","html_url":"https://github.com/smerschjohann","followers_url":"https://api.github.com/users/smerschjohann/followers","following_url":"https://api.github.com/users/smerschjohann/following{/other_user}","gists_url":"https://api.github.com/users/smerschjohann/gists{/gist_id}","starred_url":"https://api.github.com/users/smerschjohann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smerschjohann/subscriptions","organizations_url":"https://api.github.com/users/smerschjohann/orgs","repos_url":"https://api.github.com/users/smerschjohann/repos","events_url":"https://api.github.com/users/smerschjohann/events{/privacy}","received_events_url":"https://api.github.com/users/smerschjohann/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eclipse/smarthome/labels/Automation","name":"Automation","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2016-01-02T16:43:07Z","updated_at":"2016-03-09T07:49:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/eclipse/smarthome/pulls/803","html_url":"https://github.com/eclipse/smarthome/pull/803","diff_url":"https://github.com/eclipse/smarthome/pull/803.diff","patch_url":"https://github.com/eclipse/smarthome/pull/803.patch"},"body":"This PR will allow other bundles to use and instantiate ScriptEngines.\r\n\r\nIt also contains a GlobalScope optimization, which is required to circumvent some OSGI related issues concerning the current implementation of class loading for the Nashorn-based solution. It will use \"variable = variable.static\" instead of \"variable = Java.type(...)\". In addition the Scope will be initialized only one time and injected as GLOBAL_SCOPE instead of ENGINE_SCOPE.\r\n\r\nFuthermore this PR introduces a ScriptExtensionProvider. This allows OSGI-Bundles to provide functionality which is not needed at all times. The given features can be requested from a script and are not imported in all ScriptEngine instances. It furthermore allows to keep track of the loaded instances based on a ScriptEngineId. If the ScriptEngine gets unloaded, the ScriptExtensionProvider will be notified about this and can unload or undo changes it has done to the runtime."},"comment":{"url":"https://api.github.com/repos/eclipse/smarthome/issues/comments/194166076","html_url":"https://github.com/eclipse/smarthome/pull/803#issuecomment-194166076","issue_url":"https://api.github.com/repos/eclipse/smarthome/issues/803","id":194166076,"user":{"login":"lewie","id":5707426,"avatar_url":"https://avatars.githubusercontent.com/u/5707426?v=3","gravatar_id":"","url":"https://api.github.com/users/lewie","html_url":"https://github.com/lewie","followers_url":"https://api.github.com/users/lewie/followers","following_url":"https://api.github.com/users/lewie/following{/other_user}","gists_url":"https://api.github.com/users/lewie/gists{/gist_id}","starred_url":"https://api.github.com/users/lewie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewie/subscriptions","organizations_url":"https://api.github.com/users/lewie/orgs","repos_url":"https://api.github.com/users/lewie/repos","events_url":"https://api.github.com/users/lewie/events{/privacy}","received_events_url":"https://api.github.com/users/lewie/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T07:49:08Z","updated_at":"2016-03-09T07:49:08Z","body":"@smerschjohann, @kgoderis, \r\nany News about alternative scripting in OH2? \r\nI really need javascript support in OH2!\r\nIs there currently any working/testable code in OH2 with which I can perform javascript?\r\nIf not I \"simply\" would port jsr223 Binding to OH2?! \r\nJSR223:\r\nMay have you tips on how to fix the class loader problem under Karaf? Under eqinox I simply had to start java with \"-Dorg.osgi.framework.bundle.parent = ext\". Does this work for karaf too?\r\n\r\n\r\n\r\n"}}