Sorry I made a small mistake in my code (caused by copy/paste) so below now 
hopefully without bugs:

class NinjaAppModule extends AbstractModule {
    Injector injector;

    configure() {
        *CurrentUserProviderImpl userProvider = new 
*        bind(CurrentUserProvider.class).toInstance(userProvider);*

class CurrentUserProviderImpl implements *CurrentUserProvider* {   //* 
CurrentUserProvide is 
Ebean's interface that does not know anything about Guice*
    Injector injector; 
    public CurrentUserProviderImpl(*Injector injector*) {
        this.injector = injector;

    public Long currentUser() {
        RequestSession session = 
        return session.get("userID");

You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

Reply via email to