Source:
<code>protected void configure() { bindI18n(); bind(JsonProvider.class); configureJPA(); bind(BeanValidationEventListener.class).toProvider(ValidationListenerProvider.class); bind(MessageInterpolator.class).to(CandlepinMessageInterpolator.class); bind(ComplianceSnapshotCurator.class); bind(ConsumerStateCurator.class); bind(ObjectMapper.class).toInstance(new GutterballObjectMapper()); configureEventHandlers(); bind(EventManager.class).asEagerSingleton(); configureEventReciever(); Multibinder<Report> reports = Multibinder.newSetBinder(binder(), Report.class); reports.addBinding().to(ConsumerStatusReport.class); reports.addBinding().to(ConsumerTrendReport.class); bind(ReportFactory.class); bind(StatusResource.class); bind(ReportsResource.class); bind(UnsupportedMediaTypeExceptionMapper.class); bind(UnauthorizedExceptionMapper.class); bind(NotFoundExceptionMapper.class); bind(NotAcceptableExceptionMapper.class); bind(NoLogWebApplicationExceptionMapper.class); bind(MethodNotAllowedExceptionMapper.class); bind(InternalServerErrorExceptionMapper.class); bind(DefaultOptionsMethodExceptionMapper.class); bind(BadRequestExceptionMapper.class); bind(RollbackExceptionMapper.class); bind(ValidationExceptionMapper.class); bind(WebApplicationExceptionMapper.class); bind(FailureExceptionMapper.class); bind(ReaderExceptionMapper.class); bind(WriterExceptionMapper.class); bind(CandlepinExceptionMapper.class); bind(RuntimeExceptionMapper.class); bind(JAXBUnmarshalExceptionMapper.class); bind(JAXBMarshalExceptionMapper.class); <START> bind(OAuthInterceptor.class); <END> }</code><technical_language>+1 do similar AMQP stuff in Candlepin. I a contextlistener do it</technical_language>

Target:
protected void configure() { bindI18n(); bind(JsonProvider.class); configureJPA(); bind(BeanValidationEventListener.class).toProvider(ValidationListenerProvider.class); bind(MessageInterpolator.class).to(CandlepinMessageInterpolator.class); bind(ComplianceSnapshotCurator.class); bind(ConsumerStateCurator.class); bind(ObjectMapper.class).toInstance(new GutterballObjectMapper()); configureEventHandlers(); bind(EventManager.class).asEagerSingleton(); configureEventReciever(); Multibinder<Report> reports = Multibinder.newSetBinder(binder(), Report.class); reports.addBinding().to(ConsumerStatusReport.class); reports.addBinding().to(ConsumerTrendReport.class); bind(ReportFactory.class); bind(StatusResource.class); bind(ReportsResource.class); bind(UnsupportedMediaTypeExceptionMapper.class); bind(UnauthorizedExceptionMapper.class); bind(NotFoundExceptionMapper.class); bind(NotAcceptableExceptionMapper.class); bind(NoLogWebApplicationExceptionMapper.class); bind(MethodNotAllowedExceptionMapper.class); bind(InternalServerErrorExceptionMapper.class); bind(DefaultOptionsMethodExceptionMapper.class); bind(BadRequestExceptionMapper.class); bind(RollbackExceptionMapper.class); bind(ValidationExceptionMapper.class); bind(WebApplicationExceptionMapper.class); bind(FailureExceptionMapper.class); bind(ReaderExceptionMapper.class); bind(WriterExceptionMapper.class); bind(CandlepinExceptionMapper.class); bind(RuntimeExceptionMapper.class); bind(JAXBUnmarshalExceptionMapper.class); bind(JAXBMarshalExceptionMapper.class); this.configureOAuth(); }