I have tried to answer this question from two perspectives: one if you are asking about creating a class library from scratch for connection management and two if you are asking about an existing library.
1. For scratch implementation, we can do either of these:
* create a class with connection string and hide connections details from others.
* Create a public class with connection string which is passed by the consumers of this class.
2. One of the existing class libraries such as ConnectionManager. You can also use BasicDataSource from Apache Commons DBCP.
First of all, I read you well. It helped me a lot.
I wonder if amazon rds proxy can split the read endpoint and the write endpoint. When I googled it, I saw an article saying that you need to use an external proxy tool, 'Heimdall Database Proxy'. So I'd like to know your opinion on this.
Can you write example of a class library which does db connection management
Hello Praveen,
I have tried to answer this question from two perspectives: one if you are asking about creating a class library from scratch for connection management and two if you are asking about an existing library.
1. For scratch implementation, we can do either of these:
* create a class with connection string and hide connections details from others.
* Create a public class with connection string which is passed by the consumers of this class.
2. One of the existing class libraries such as ConnectionManager. You can also use BasicDataSource from Apache Commons DBCP.
I have also written a few sample implementations (from scratch) in my previous article https://aastikta.substack.com/p/connection-pooling-to-improve-database You can also give that a look and let me know your opinion around those.
First of all, I read you well. It helped me a lot.
I wonder if amazon rds proxy can split the read endpoint and the write endpoint. When I googled it, I saw an article saying that you need to use an external proxy tool, 'Heimdall Database Proxy'. So I'd like to know your opinion on this.