Guicey lifecycle


Guicey broadcast events in all major points. You can see most of them with enabled lifecycle report.

Configuration phase


All manual registrations must be performed under this phase (the only exception is guice modules). All bundles are registered and initialized only under configuration phase.

Everything below happens under bundle registration call:

public void initialize(Bootstrap<Configuration> bootstrap) {

    // everything here will be called after all steps below

Run phase


As dropwizard bundles were registered under GuiceBundle configuration, they will be run by dropwizard after GuiceBundle.


Your method will be called after guicey startup, so you can use created injector there.

Jersey startup


Jersey startup will initiate hk2 context creation

  • Managed beans started
  • hk2 context creation activates GuiceFeature (registered earlier)
    • Apply guice bridge (if required)
    • Run jersey specific installers (resource, extension): installers will register required bindings in hk2 context


Any EnvironmentCommand did no start jersey, so managed objects will not be started (but you can start required services manually. Also, all jersey related extensions will not be started. Still, core guice context will be completely operable.

When guice context is created, jersey context doesn't exist and when jersey context is created it doesn't aware of guice existence.