[prev in list] [next in list] [prev in thread] [next in thread]
List: activemq-dev
Subject: Re: [DISCUSS] activemq-pool - Suggest to name maximumActive option maximumActiveSessionPerConnection
From: Dejan Bosanac <dejan () nighttale ! net>
Date: 2012-08-30 9:25:52
Message-ID: CAGeh-pGWzLFtGZKyOiWQWVLzZfgw6XML6DKGsKTh0GvNqaVTPA () mail ! gmail ! com
[Download RAW message or body]
+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 <claus.ibsen@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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic