Reading the documentation on PostgreSQL documentation here I read the following:
As well, connections requested for users other than the default configured user are not pooled.
I couldn't find any more information on this. Who is the default configured user? Is it the user I logged in to the db with?
So in the following example:
Jdbc3PoolingDataSource source = new Jdbc3PoolingDataSource();
source.setDataSourceName("A Data Source");
source.setServerName("localhost");
source.setDatabaseName("test");
source.setUser("testuser");
the default configured user is testuser
?
The default user is the one you set on the DataSource
itself, however a DataSource
has more than one method to obtain a connection:
The first method uses the (default) user configured on the DataSource
. Based on the quoted documentation for the implementation you use, this method will provide a connection from the connection pool.
The second method takes a user name and password, and as indicated by the documentation you quoted that connection will not be pooled (except maybe if the username and password provided matches the default user of the DataSource
).