activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject [DISCUSS] activemq-pool - Suggest to name maximumActive option maximumActiveSessionPerConnection
Date Wed, 29 Aug 2012 11:19:57 GMT
Hi

The activemq-pool is a connection pool for AMQ, that clients can use.
And therefore end-users need to configure the pool for their needs.

The main configuration is the  org.apache.activemq.pool.PooledConnectionFactory
because its a javax.jms.ConnectionFactory, which is an API from JMS
which clients need to use to get a connection, and then go from there.

In the source code of org.apache.activemq.pool.PooledConnectionFactory
it has a number of options.
One of these is
    private int maximumActive = 500;

    /**
     * Sets the maximum number of active sessions per connection
     */
    public void setMaximumActive(int maximumActive) {
        this.maximumActive = maximumActive;
    }


At first thought without reading the javadoc, you may think as I its a
option for maximum active *connections*. But it is not, its for
sessions per connection.

The default values are
    private int maximumActive = 500;
    private int maxConnections = 1;

So that mean we have 1 connection, and that given connection can have
500 sessions, where these session would then share the same
connection.


What if we named that option *maximumActiveSessionPerConnection*, then
people would not make that mistake, thinking its for controlling the
maximum active connections.

We could add that as a new option, and keep the old option, and mark
it as @deprecated. Then we are backwards compatible.


Any thoughts?


-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message