users@jms-spec.java.net

[jms-spec users] Re: PoolSize Configuration

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Wed, 20 Nov 2013 11:30:16 +0000

On 18/11/2013 18:19, Dayo Egbetola wrote:
> Is there any plan to have the jms standard define activation config properties from pool size?
>
> It seems reasonable that anyone who defines an mdb would want to define the number of beans available for mdb
> processing. Most containers provide some way of setting it.
>
> Have there been discussions on this point previously?

Thanks for your email. This isn't something that has been discussed, but it's a good suggestion. Here are my own thoughts:

MDBs are defined in the EJB specification, not the JMS specification, so we would need to work with the EJB expert group
on this.

MDBs aren't just for JMS, so we would need to consider is whether we'd want to define standard pooling properties just
for JMS, or for all MDBs.

The EJB spec doesn't require a MDB (whether JMS or not) to be implemented using a pool of MDB instances. So in
standardising pooling we may be trespassing on what is currently an implementation detail.

Most MDB pools are configured using multiple properties such as initialPoolSize, minPoolSize, maxPoolSize,
steadyPoolSize and so on, depending on how the pool is implemented and what features it offers (e.g. some pools may
allow the pool to grow and shrink whilst others might be fixed-size). Which of these are could be standardised and which
of these would we have to leave as an implementation detail? It would probably be inappropriate to attempt to
standardise them all.

On the other hand, the new Java EE 7 resource configuration features do introduce a notion of pooling for JMS
connections (not MDBs). The new <jms-connection-factory> deployment descriptor element has the sub-elements
<max-pool-size> and </min-pool-size>, and the new javax.jms.ConnectionFactoryDefinition annotation has the attributes
minPoolSize and maxPoolSize. So this does offer precedent for defining pooling properties.

I've logged this as
https://java.net/jira/browse/JMS_SPEC-143

Nigel