{"action":"opened","issue":{"url":"https://api.github.com/repos/vaadin/flow/issues/4371","repository_url":"https://api.github.com/repos/vaadin/flow","labels_url":"https://api.github.com/repos/vaadin/flow/issues/4371/labels{/name}","comments_url":"https://api.github.com/repos/vaadin/flow/issues/4371/comments","events_url":"https://api.github.com/repos/vaadin/flow/issues/4371/events","html_url":"https://github.com/vaadin/flow/issues/4371","id":339311162,"node_id":"MDU6SXNzdWUzMzkzMTExNjI=","number":4371,"title":"OGSI: BootstrapHandler being in flow-server wants to access to the resources in flow-client","user":{"login":"denis-anisimov","id":11425472,"node_id":"MDQ6VXNlcjExNDI1NDcy","avatar_url":"https://avatars0.githubusercontent.com/u/11425472?v=4","gravatar_id":"","url":"https://api.github.com/users/denis-anisimov","html_url":"https://github.com/denis-anisimov","followers_url":"https://api.github.com/users/denis-anisimov/followers","following_url":"https://api.github.com/users/denis-anisimov/following{/other_user}","gists_url":"https://api.github.com/users/denis-anisimov/gists{/gist_id}","starred_url":"https://api.github.com/users/denis-anisimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denis-anisimov/subscriptions","organizations_url":"https://api.github.com/users/denis-anisimov/orgs","repos_url":"https://api.github.com/users/denis-anisimov/repos","events_url":"https://api.github.com/users/denis-anisimov/events{/privacy}","received_events_url":"https://api.github.com/users/denis-anisimov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"denis-anisimov","id":11425472,"node_id":"MDQ6VXNlcjExNDI1NDcy","avatar_url":"https://avatars0.githubusercontent.com/u/11425472?v=4","gravatar_id":"","url":"https://api.github.com/users/denis-anisimov","html_url":"https://github.com/denis-anisimov","followers_url":"https://api.github.com/users/denis-anisimov/followers","following_url":"https://api.github.com/users/denis-anisimov/following{/other_user}","gists_url":"https://api.github.com/users/denis-anisimov/gists{/gist_id}","starred_url":"https://api.github.com/users/denis-anisimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denis-anisimov/subscriptions","organizations_url":"https://api.github.com/users/denis-anisimov/orgs","repos_url":"https://api.github.com/users/denis-anisimov/repos","events_url":"https://api.github.com/users/denis-anisimov/events{/privacy}","received_events_url":"https://api.github.com/users/denis-anisimov/received_events","type":"User","site_admin":false},"assignees":[{"login":"denis-anisimov","id":11425472,"node_id":"MDQ6VXNlcjExNDI1NDcy","avatar_url":"https://avatars0.githubusercontent.com/u/11425472?v=4","gravatar_id":"","url":"https://api.github.com/users/denis-anisimov","html_url":"https://github.com/denis-anisimov","followers_url":"https://api.github.com/users/denis-anisimov/followers","following_url":"https://api.github.com/users/denis-anisimov/following{/other_user}","gists_url":"https://api.github.com/users/denis-anisimov/gists{/gist_id}","starred_url":"https://api.github.com/users/denis-anisimov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denis-anisimov/subscriptions","organizations_url":"https://api.github.com/users/denis-anisimov/orgs","repos_url":"https://api.github.com/users/denis-anisimov/repos","events_url":"https://api.github.com/users/denis-anisimov/events{/privacy}","received_events_url":"https://api.github.com/users/denis-anisimov/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-07-09T05:37:42Z","updated_at":"2018-07-09T05:37:42Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"`BootstrapHandler` class needs generated resource in the `flow-client` module.\nThe way how it's done is : \n```\nBootstrapHandler.class.getResource(\n                \"/META-INF/resources/\"+...);\n```\nSince the resources are in the different bundle it's not possible to access them in this way.\nThe code should be adapted to be able to work with OSGi.\n\nThe implementation suggestion:\n- Make a service in `flow-server`.\n- `flow-client` depends on the `flow-server` so it may implement a service and register it.\n- `flow-server` should check the presence of OSGi and if we are in OGSi container use the service, otherwise use plain Java approach.\n- we will need to have a code which depends on the OSGi classes which may not be in the classpath during runtime. So OSGi dependency should be added to the `flow-server`  module as `provided`  and OSGi related code should be separated from other code so that there will be no runtime exception on resources load.\n\nThat's one of the suggestion.\nThere can be other ways (don't know about them unfortunately) but I'm going to implement it in this way for now.\nThe implementation may be changed later on. But the issue is still the same: the resources are in the other bundle and we need a way to access them."}}
{"actor":{"display_login":"denis-anisimov"}}