Skip to content

OSGi current recommended usage patterns and 'how to' s.

Gordon Hutchison edited this page May 5, 2023 · 7 revisions

Mandatory static references

For mandatory static references the preferred way to inject is to use constructor injection:

@Activate
public NettyFrameworkImpl(@Reference ExecutorService executorService) {
    this.executorService = executorService;
}

Service Components

Use a @Component rather than a .bnd file entry and there is no need to have the service.vendor field

slack

Clone this wiki locally