vigneshwar reddy
vigneshwar reddy

Reputation: 175

Postgres connection pooling using java

I'm using multithreading concept in java and thread's responsibility is to connect to postgres and upload my csv's to tables. So far,I'm creating connection for each thread and closing upon finsihing thread's task.I was come across their is something called connection pooling. I'm not aware, How do I integrate this connection pooling concept to my application? I'm confused, where to start and how do I start?

Thanks in Advance

Upvotes: 0

Views: 1226

Answers (1)

Phani
Phani

Reputation: 88

It would be helpfull if you provide some more context or code.

PostgersSql provides two Datasources one which provides pooling and other does not. Please refer to this https://jdbc.postgresql.org/documentation/head/ds-ds.html

However if you are using any kind on application server it should have provided some Manager to maintain connection.

Upvotes: 2

Related Questions