[jboss-user] [IronJacamar] - Jboss 6.0 + PostgreSQL Datasource + security-domain + CallerIdentityLoginModule : Can i set max number of pools?

achill mantzios do-not-reply at jboss.com
Mon Jan 3 07:04:28 EST 2011


achill mantzios [http://community.jboss.org/people/panixgr] created the discussion

"Jboss 6.0 + PostgreSQL Datasource + security-domain + CallerIdentityLoginModule : Can i set max number of pools?"

To view the discussion, visit: http://community.jboss.org/message/578289#578289

--------------------------------------------------------------
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 
<application-policy name="postgresqluser">
    <authentication>
      <login-module code="org.jboss.resource.security.CallerIdentityLoginModule" flag="required">
        <module-option name = "managedConnectionFactoryName">jboss.jca:service=XATxCM,name=pgsql</module-option>
      </login-module>
    </authentication>
  </application-policy>

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 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!
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/578289#578289]

Start a new discussion in IronJacamar at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2098]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110103/37c0d1fd/attachment.html 


More information about the jboss-user mailing list