Out of Memory occurs when the Carbage Collector is not able to make any space for creating new objects, and the Heap memory space cannot be expanded as well. This is a very critical issue because if the memory space becomes insufficient, then the application will not start its operation. For example. once a call is made, if there is a screen taking up more memory than the limit set for Heap Memory, it will result in an Out Of Memory Error in the Heap space.
After the use of JDBC connection, if the connection is not returned, then the corresponding connection does not get returned to the pool and becomes inaccessible for other service requests. Furthermore, the number of available connections in the pool will gradually decrease and will be exhausted at a particular point which may lead to delays in running the applications.