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

New injection manager for Helidon #3245

Merged
merged 13 commits into from
Aug 17, 2021

Conversation

spericas
Copy link
Member

@spericas spericas commented Aug 3, 2021

New implementation of a Jersey injection manager to handle separation of JAX-RS applications. The new injection manager uses two underlying managers: one that is shared among all applications and one to register classes and singletons returned by the application. For a Helidon application that defines N JAX-RS applications, there will be N+1 of these core managers.

Lookups and injections are carried out by first consulting the shared manager and then the one for the application. This may potentially add some runtime overhead that would need to be tested using our micro-benchmarks.

PR #3166

…on of JAX-RS applications.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
@spericas spericas added the wip label Aug 3, 2021
@spericas spericas self-assigned this Aug 3, 2021
@spericas spericas added the jax-rs JAX-RS and Jersey related issues label Aug 3, 2021
Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
… between Application subclasses.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
…me order. Some renaming of variables to help understand semantics.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
@spericas spericas requested a review from tjquinno August 12, 2021 13:05
@spericas spericas removed the wip label Aug 12, 2021
@spericas spericas added this to the 2.4.0 milestone Aug 12, 2021
@spericas spericas added the wip label Aug 12, 2021
…ds creating multiple injection providers. Better handling of singleton bindings and some new log messages.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
…internal property to force a single manager regardless of number of JAX-RS apps.

Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
Signed-off-by: Santiago Pericasgeertsen <santiago.pericasgeertsen@oracle.com>
Copy link
Member

@tjquinno tjquinno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had a thorough walkthrough of the bulk of the changes, and the single-case optimization is straight-forward.

@ljnelson
Copy link
Member

The only (naïve) question I have is: shouldn't you check the application-specific InjectionManager first and then fall back on the shared one?

@spericas
Copy link
Member Author

The only (naïve) question I have is: shouldn't you check the application-specific InjectionManager first and then fall back on the shared one?

There's no overlap between them, and most of the beans will be in the shared one, so checking it in the reverse order will be more costly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jax-rs JAX-RS and Jersey related issues wip
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants