Plumbing code

Let's take an example of configuring DataSource in the Tomcat environment. Now that the developers want to use this configured DataSource in the application, what will we do? Yes, we will do the JNDI lookup to get DataSource. In order to handle JDBC, we will acquire the connection using DataSource and then release the resources in try...catch. The code written in try...catch and the inter-computer communication using Socket are not application-specific code. Such a type of low-level code that helps you communicate between the application and its underlying layers is called plumbing code. The plumbing code is an unavoidable part of the application, without which, the system will not be able to work as per requirements. The plumbing code increases the length of the code and makes the debugging complex.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.107.229