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

Using LifecycleManager is not documented right? #304

Open
asafm opened this issue Jun 20, 2016 · 4 comments
Open

Using LifecycleManager is not documented right? #304

asafm opened this issue Jun 20, 2016 · 4 comments

Comments

@asafm
Copy link

asafm commented Jun 20, 2016

In the docs it says:

  1. Create an injector using the builder, and then
  2. LifecycleManager manager = injector.getInstance(LifecycleManager.class); manager.start();

I'm using version 1.12.0 (from Jan 2016) and from some reason LifecycleManager class doesn't have start() or stop() method.

How should I enable the Lifecycle feature?

@tcellucci
Copy link
Contributor

the issue is likely that the code above is referencing "com.netflix.governator.LifecycleManager" (governator-core), rather than "com.netflix.governator.lifecycle.LifecycleManager" (governator-legacy) which does have a start() method. We're working to simplify the Governator internals and move away from governator-legacy, but work is not yet complete. In the meantime if you change your imports to use "com.netflix.governator.lifecycle.LifecycleManager", then lifecycle management can be started per the docs.

@asafm
Copy link
Author

asafm commented Jul 10, 2016

Sounds good. I think the correct approach would be to document it properly - exactly what you wrote above until you will fix it

@asafm
Copy link
Author

asafm commented Feb 16, 2017

I would simply change this page to say: "Make sure you import the correct class which is com.netflix.governator.lifecycle.LifecycleManager and not com.netflix.governator.lifecycle.LifecycleManager which is the internal class"

@svenkubiak
Copy link

Just stumbled upon this also. Not sure, what is there right import here.

com.netflix.governator.guice.LifecycleInjector

has a start method, while

com.netflix.governator.LifecycleInjector

has not. So what is the correct approch?

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

3 participants