users@jms-spec.java.net

[jms-spec users] [jsr343-experts] Re: JMS 2.0 late change: Activation property subscriptionScope

From: John D. Ament <john.d.ament_at_gmail.com>
Date: Mon, 14 Jan 2013 09:14:50 -0500

Nigel,

I believe most app servers treat acknowledgeMode (at least) as case
insensitive. Or at least the XML values can be all caps while the
annotations may be case sensitive. May be worthwhile to
get implementer opinions on this one.


On Mon, Jan 14, 2013 at 9:08 AM, Nigel Deakin <nigel.deakin_at_oracle.com>wrote:

> Thanks for the comments, Rüdiger and John A. I think we're agreed that the
> names can be changed as proposed.
>
> You also suggested that we also defined the values of subscriptionScope to
> be case-insensitive. I'm a little hesitant about this, as other activation
> property values are not defined as case-insensitive. At least not currently.
>
> Just to recap: the JMS activation properties are:
>
> acknowledgeMode: Auto-acknowledge or Dups-ok-acknowledge (only)
> destinationType: javax.jms.Queue or javax.jms.Topic (note that these are
> strings)
> subscriptionDurability: Durable or NonDurable
> subscriptionScope: Instance or Cluster (new in JMS 2.0)
>
> Another approach might be to define some String constants for these. These
> could be used when defining activation properties using annotations, though
> obviously not when defining them in the deployment descriptor.
>
> We could define some constants:
>
> javax.jms.AcknowledgeMode.**AUTO_ACKNOWLEDGE= "Auto-acknowledge"
> javax.jms.AcknowledgeMode.**DUPS_OK_ACKNOWLEDGE= "Dups-ok-acknowledge"
>
> (Note however that there is a danger of this being confused with
> Session.AUTO_ACKNOWLEDGE = 1
> Session.DUPS_OK_ACKNOWLEDGE = 3)
>
> javax.jms.DestinatonType.QUEUE = "javax.jms.Queue"
> javax.jms.DestinatonType.**TOPIC= "javax.jms.Topic"
>
> javax.jms.**SubscriptionDurability.DURABLE = "Durable"
> javax.jms.**SubscriptionDurability.**NONDURABLE = "NonDurable"
>
> javax.jms.SubscriptionScope.**INSTANCE = "Instance"
> javax.jms.SubscriptionScope.**CLUSTER= "Cluster"
>
> We could, I suppose, put these in a separate package javax.jms.activation
> to help keep these separate from any constants used by the JMS API itself.
>
> Thoughts?
>
> Nigel
>
>
>
> On 11/01/2013 16:36, Rüdiger zu Dohna wrote:
>
>> How's about defining them to be case insensitive?
>>
>> On 11.01.2013, at 17:30, Nigel Deakin<nigel.deakin_at_oracle.com**> wrote:
>>
>> I would like to propose another small change.
>>>
>>> Section 12.1 "Activation properties" defines a property
>>> "subscriptionScope" which can be set to "instance" or "cluster".
>>>
>>> I propose that we change the names of these values to "Instance" and
>>> "Cluster" (i.e. change them to start with capital
>>> letters).
>>>
>>> This makes them consistent with the existing property
>>> "subscriptionDurability" which can be set to "Durable" or
>>> "NonDurable", both of which start with a capital letter.
>>>
>>> Nigel
>>>
>>
>>