activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: [DISCUSS] activemq-pool - Suggest to name maximumActive option maximumActiveSessionPerConnection
Date Thu, 30 Aug 2012 08:36:13 GMT
Hi

I created a ticket to track this
https://issues.apache.org/jira/browse/AMQ-4004

On Wed, Aug 29, 2012 at 4:20 PM, Timothy Bish <tabish121@gmail.com> wrote:
> +1
>
> On Wed, 2012-08-29 at 13:19 +0200, Claus Ibsen wrote:
>> 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?
>>
>>
>
> --
> Tim Bish
> Sr Software Engineer | FuseSource Corp
> tim.bish@fusesource.com | www.fusesource.com
> skype: tabish121 | twitter: @tabish121
> blog: http://timbish.blogspot.com/
>



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