Let me correct that last post, I forgot to add the @Inject annotation to the service... it's working... thank you!

Edgar Merino





Edgar Merino escribió:
Thank you Jeremy, I've tried that but it did not work:

public class Instantiator {
   public Instantiator() {
      Injector injector = ( (GuiceInjectorHolder) CmsApplication.get()
.getMetaData(GuiceInjectorHolder.INJECTOR_KEY)).getInjector();

      injector.injectMembers(this);
   }

   ...
}

maybe I'm doing something wrong? any other solution? thank you

Edgar Merino




Jeremy Thomerson escribió:
Try adding a constructor and putting this line in it:

*InjectorHolder*.*getInjector*().*inject*(*this*);

Works with Spring - haven't used Guice personally.





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to