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

refactored the code to avoid creation two LifecycleInjector objects (and... #45

Merged
merged 4 commits into from
Aug 6, 2013

Conversation

stevenzwu
Copy link
Contributor

... two root Guice injectors)

@cloudbees-pull-request-builder

karyon-pull-requests #14 FAILURE
Looks like there's a problem with this pull request

@@ -75,7 +78,7 @@
before returning from {@link com.google.inject.Module#configure(Binder)}.</li>
<li>{@link ServerBootstrap#configureBinder}: Callback to configure {@link Binder} before returning from
{@link BootstrapModule#configure(com.netflix.governator.guice.BootstrapBinder)}.</li>
<li>{@link ServerBootstrap#beforeInjectorCreation(com.netflix.governator.guice.LifecycleInjectorBuilder)}: A callback
Copy link
Contributor

Choose a reason for hiding this comment

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

Any specific reason why we are breaking backward compatibility here? beforeInjectorCreation() is the point where apps can add their modules to governator

@NiteshKant
Copy link
Contributor

I think it will be better to leave ServerBootstrap.beforeInjectorCreation() as is and provide the overridable method createInjector() as you already have.

@@ -170,7 +169,7 @@ public KaryonServer(@Nullable ServerBootstrap bootstrap) {
* {@link ServerBootstrap}. <br/>
* This method must be called during the server initialization.
*
* @return Guice's injector instance that will be used by <a href="https://github.com/Netflix/governator/">Governator</a>
* @return main injector instance that will be used by <a href="https://github.com/Netflix/governator/">Governator</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

At the cost of this sounding nitpicking, I think it is confusing :)
I know the context w.r.t how we use it inside Netflix, but "Guice's injector" is much more clear as karyon only has a single injector.

@cloudbees-pull-request-builder

karyon-pull-requests #18 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

karyon-pull-requests #19 SUCCESS
This pull request looks good

NiteshKant added a commit that referenced this pull request Aug 6, 2013
refactored the code to avoid creation two LifecycleInjector objects (and...
@NiteshKant NiteshKant merged commit 6afe1c0 into Netflix:master Aug 6, 2013
@cloudbees-pull-request-builder

karyon-pull-requests #20 SUCCESS
This pull request looks good

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

Successfully merging this pull request may close these issues.

3 participants