At some point you want to consider that wrapping db-reads in a Provider method is hiding too much logic in an abstraction. Stay thin if you can.
What would you gain with the injection? On Sun, Nov 23, 2014 at 11:49 AM, Joseph <[email protected]> wrote: > Hello, > > I need to make multiple objects of a client that takes a config object as > a parameter. So for example, to do this using "new" I would do: > > Config conf = new Conf(123, 444, "whatever"); > > > Client client = new Client(conf); > > I realize I can have a Provides method for Config and a Provides method > for Client, that has Config injected, however, Config's parameters are not > constant and not passed in the command line or a config file. They are > constantly changing and from a db, and the row in the db is not constant, > as I am making multiple objects. Config and Client are from third party > libraries so I cannot add @Assisted to their constructors. > > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/google-guice. > To view this discussion on the web visit > https://groups.google.com/d/msgid/google-guice/c3b1aab1-3ea0-45c7-a01e-71560766392b%40googlegroups.com > <https://groups.google.com/d/msgid/google-guice/c3b1aab1-3ea0-45c7-a01e-71560766392b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-guice. To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/CAKCukAJ%2Bu5td7fKzk42kM-NhuWU3-Yjsnhfb-bdQ9cPNs7ZvUA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
