This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Hi. I have some code that dynamically creates object instances according to the name of the class that's passed in (it creates different handler objects based on the type of message that's received).
Those handler objects (myObj) could use dependency injection to choose between two different Database types that we use. Is there a way to use DI for those handler objects, if they're created on the fly like this?