Comment by kont...@cre-do.de:

How to inject into the new DatabaseTransactionLog automatically? Following the above example,

    DatabaseTransactionLog transactionLog = new DatabaseTransactionLog();

creates a new object of the desired type. But this object will not get injected itself as long it is only created with new! Should I use

DatabaseTransactionLog transactionLog = injector.getInstance(DatabaseTransactionLog.class);

instead? But this would need to inject the injector itself into my provider first which - in turn - is frowned upon and makes not much sense to me. So, how to let all these new objects created by the provider also be injected automatically?

For more information:
http://code.google.com/p/google-guice/wiki/ProviderBindings

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to google-guice-dev@googlegroups.com.
To unsubscribe from this group, send email to 
google-guice-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en.

Reply via email to