Hello and merry Xmas to all.
Being a jboss user (starting from 3.0.3, still deployed in some remote locations) for the the last 10 years,
I have succesfully set up a new test system Jboss 6.0, postgresql 9.0.2, openjdk 1.6, in a process to completely
upgrade all of our application engine software.
I had an idea, instead of going the old way of creating the postgresql pool with one user (typically : postgres),
to try having personalized connections, which makes debugging, diagnosing a very very easy task.
So i set up <security-domain>postgresqluser</security-domain>, then in login-config.xml i defined
<login-module code="org.jboss.resource.security.CallerIdentityLoginModule" flag="required">
<module-option name = "managedConnectionFactoryName">jboss.jca:service=XATxCM,name=pgsql</module-option>
I set up both jboss and postgresql authenticate against the same LDAP server, and all the magic seemed to work!!
As i understand it, one separate pool will be created for each user.
However this is the only unpleasant thing in the whole story.
I'd like to have a way to restrict the max total pools created, in order to pose a limit in the max total connections to the db.
In other words emulate <max-pool-size> as if we were talking about the normal "OnePool" case.
Is there anything to pose a limit to the number of actual pools created?
This is not for use in high traffic web situation (where usually the apps are simple and the number of users large).
This is for a business, with 200 total users, but a big complexity of apps, queries, etc...
I am planning to set up min-pool-size=0, max-pool-size=4 and idle-timeout-minutes=5 minutes.
(maybe more fine tuning on this last one)
During the last 10 months, we had on average 100 distinct logged in users par day, and 130 max.
Haven't done yet any research on the definition/estimation of "concurrent" users in the system.
(in order to assess the max number of "simultaneous" connections).
Anyway, I'd like to ask :
a) if you see any potential risks with this
b) if there is a way to limit the max numbers of pools (as a means to limit the max total potential number of connections to the db)
c) My eye fell on http://docs.jboss.org/jbossas/6/JCA_Guide/en-US/html_single/#An_Overview_of_the_JBoss_JCA_Architecture-JBossManagedConnectionPool_MBean
where it suggest that by specifying Criteria=ByNothing means
"all connections are equivalent, usually if adapter supports reauthentication "
Ideally what would be great is if we could have a total max number of connections, across all users,
and reauthenticating in the already existing connections.
I dont know whether postgresql supports this but it would be cool in general to have.
Thank you for any help!