{"action":"created","issue":{"url":"https://api.github.com/repos/hstaudacher/osgi-jax-rs-connector/issues/96","labels_url":"https://api.github.com/repos/hstaudacher/osgi-jax-rs-connector/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/hstaudacher/osgi-jax-rs-connector/issues/96/comments","events_url":"https://api.github.com/repos/hstaudacher/osgi-jax-rs-connector/issues/96/events","html_url":"https://github.com/hstaudacher/osgi-jax-rs-connector/issues/96","id":73548452,"number":96,"title":"Framework is initializing all registered services","user":{"login":"doggy-dev","id":8276721,"avatar_url":"https://avatars.githubusercontent.com/u/8276721?v=3","gravatar_id":"","url":"https://api.github.com/users/doggy-dev","html_url":"https://github.com/doggy-dev","followers_url":"https://api.github.com/users/doggy-dev/followers","following_url":"https://api.github.com/users/doggy-dev/following{/other_user}","gists_url":"https://api.github.com/users/doggy-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/doggy-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doggy-dev/subscriptions","organizations_url":"https://api.github.com/users/doggy-dev/orgs","repos_url":"https://api.github.com/users/doggy-dev/repos","events_url":"https://api.github.com/users/doggy-dev/events{/privacy}","received_events_url":"https://api.github.com/users/doggy-dev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-06T07:59:29Z","updated_at":"2015-05-06T15:27:19Z","closed_at":null,"body":"The connector examines every object that is being registered as osgi service. This is undesired because this way every service factory creates a new instance and every declarative service is beeing initialized.\r\nPlease use another way to determine if the registered service is a servlet. For example a service property can be used or an interface. This way you have to examine only the service reference."},"comment":{"url":"https://api.github.com/repos/hstaudacher/osgi-jax-rs-connector/issues/comments/99514026","html_url":"https://github.com/hstaudacher/osgi-jax-rs-connector/issues/96#issuecomment-99514026","issue_url":"https://api.github.com/repos/hstaudacher/osgi-jax-rs-connector/issues/96","id":99514026,"user":{"login":"colemarkham","id":608311,"avatar_url":"https://avatars.githubusercontent.com/u/608311?v=3","gravatar_id":"","url":"https://api.github.com/users/colemarkham","html_url":"https://github.com/colemarkham","followers_url":"https://api.github.com/users/colemarkham/followers","following_url":"https://api.github.com/users/colemarkham/following{/other_user}","gists_url":"https://api.github.com/users/colemarkham/gists{/gist_id}","starred_url":"https://api.github.com/users/colemarkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colemarkham/subscriptions","organizations_url":"https://api.github.com/users/colemarkham/orgs","repos_url":"https://api.github.com/users/colemarkham/repos","events_url":"https://api.github.com/users/colemarkham/events{/privacy}","received_events_url":"https://api.github.com/users/colemarkham/received_events","type":"User","site_admin":false},"created_at":"2015-05-06T15:27:19Z","updated_at":"2015-05-06T15:27:19Z","body":"I think allowing a custom filter to be supplied would be a good compromise. A custom filter could inspect a specific property, look for an interface, etc. I believe the only option now is to filter based on ID, but maybe that is already flexible enough. I agree with Holger, most existing users don't mind that all services get initialized, but in resource constrained environments that might not be acceptable."}}