as part of seam application we want to extend it to use Guice
primarily around avoiding Factory creation and Unit Testing. When
class is executed from stand alone program it works fine, but when
attempted to run it part of EAR file, the boostrap mechanism(servlet
init) says the Guice Module is configured, but when i use @Inject
syntax, the values are null.. any thoughts..

GuiceSetup snippet:

        @Override
        protected void configure() {
                System.out.println("GuiceSetupModule configure INVOKED");

                bind(GatewayAccessor.class)
                .to(GatewayAccessorImpl.class)
                .in(Scopes.SINGLETON);

                bind(GatewayAuthenticator.class)
                .to(GatewayAuthenticatorImpl.class)
                .in(Scopes.SINGLETON);

                Properties properties = loadProperties();
                Names.bindProperties(binder(), properties);
          }

Code to Inject:

        @Inject @Named("gateway.UserId")
        private String userId;
        @Inject
        private GatewayAuthenticator gatewayAuthenticator;
        @Inject
        private GatewayAccessor gatewayAccessor;

when logging these values they are all null

Thanks in advance...


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to