Mittwoch, 16. Juli 2014

Why Spring makes me sick #6

From the Spring Framework Reference Documentation: "Lookup method injection is the ability of the container to override methods on container managed beans, to return the lookup result for another named bean in the container."

 I essence this means, that spring will either a) replace a method or b) implement an abstract method. At run time. With a dynamically generated class.

For the developer this means that either a) a method, he sees in the source code, is not what is actually executed at run time or b) the abstract method, he sees in the source code, and for which he can find no implementation, is still somehow executed at run time. Further more the class, he sees in the source code, is not the class that will eventually be executed. And of course, if the method was abstract, then the class was abstract too and there will probably be no implementation of this abstract class.

Nightmare is the first association that pops up in my mind. How is anyone supposed to debug such a mess?
The horror.

Luckily, this mechanism is used in the project I'm currently working on...

Keine Kommentare:

Kommentar veröffentlichen