You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Claus Ibsen <cl...@gmail.com> on 2012/08/29 13:19:57 UTC

[DISCUSS] activemq-pool - Suggest to name maximumActive option maximumActiveSessionPerConnection

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

Re: [DISCUSS] activemq-pool - Suggest to name maximumActive option maximumActiveSessionPerConnection

Posted by Gary Tully <ga...@gmail.com>.
+1

makes perfect sense

On 29 August 2012 12:19, Claus Ibsen <cl...@gmail.com> 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?
>
>
> --
> 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



-- 
http://fusesource.com
http://blog.garytully.com

Re: [DISCUSS] activemq-pool - Suggest to name maximumActive option maximumActiveSessionPerConnection

Posted by Dejan Bosanac <de...@nighttale.net>.
+1

Regards
-- 
Dejan Bosanac
Senior Software Engineer | FuseSource Corp.
dejanb@fusesource.com | fusesource.com
skype: dejan.bosanac | twitter: @dejanb
blog: http://www.nighttale.net
ActiveMQ in Action: http://www.manning.com/snyder/


On Wed, Aug 29, 2012 at 1:19 PM, Claus Ibsen <cl...@gmail.com> 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?
>
>
> --
> 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

Re: [DISCUSS] activemq-pool - Suggest to name maximumActive option maximumActiveSessionPerConnection

Posted by Claus Ibsen <cl...@gmail.com>.
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 <ta...@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

Re: [DISCUSS] activemq-pool - Suggest to name maximumActive option maximumActiveSessionPerConnection

Posted by Timothy Bish <ta...@gmail.com>.
+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/