Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OGSI: BootstrapHandler being in flow-server wants to access to the resources in flow-client #4371

Closed
denis-anisimov opened this issue Jul 9, 2018 · 0 comments
Assignees
Milestone

Comments

@denis-anisimov
Copy link
Contributor

BootstrapHandler class needs generated resource in the flow-client module.
The way how it's done is :

BootstrapHandler.class.getResource(
                "/META-INF/resources/"+...);

Since the resources are in the different bundle it's not possible to access them in this way.
The code should be adapted to be able to work with OSGi.

The implementation suggestion:

  • Make a service in flow-server.
  • flow-client depends on the flow-server so it may implement a service and register it.
  • flow-server should check the presence of OSGi and if we are in OGSi container use the service, otherwise use plain Java approach.
  • 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.

That's one of the suggestion.
There can be other ways (don't know about them unfortunately) but I'm going to implement it in this way for now.
The 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants