In this chapter, we discuss valuable techniques that can make life easier when investigating specific scenarios. We start the chapter by examining an approach for identifying connection problems between a Java app and a relational database server. We already discussed profiling SQL queries in chapter 7, but sometimes problems appear when an app establishes communication with a DBMS. Such situations can even lead to an app not responding at all, which makes finding the causes of such problems essential.
In section 8.2, I’ll show you one of my favorite ways to understand the code behind a given execution scenario—a simple approach using call graphs, which are visual representations of the dependencies between an app’s objects. I find call graphs helpful, especially when dealing with messy code I’ve never seen before. And since I’m sure most developers have to deal with messy codebases at some point in their careers, knowing this approach will be helpful.