jsr343-experts@jms-spec.java.net

[jsr343-experts] Re: (JMS_SPEC-94) Define what characters are valid in a durable (or shared subscription) name

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Fri, 20 Apr 2012 10:11:38 +0100

Your suggestion of adopting the full Java identifier rules seems a good one: this is essentially an arbitrary rule so we
might as well adopt an existing rule and follow it consistently rather than pluck a list of characters out of the air.

I didn't mention this before, but a colleague advises me that using "/" may also be a problem for WebLogic JMS, even
though it doesn't seem to be documented.

I'd like to choose a rule which doesn't cause excessive problems for existing JMS providers, though I think JMS 2.0 is
free to define any rule it likes so long as it is reasonably capable of being implemented.

Note that I'm not suggesting that JMS vendors would have to stop allowing characters that they allow currently. I'm just
trying to define a minimum set.

As I mentioned, I'm trying to support EJB_SPEC-41 (which was logged by me on behalf of this group), which is about
automatically generating durable subscription names for MDBs.

Nigel

On 20/04/2012 07:46, Rüdiger zu Dohna wrote:
> JavaIdentifier sounds as a reasonable ground to start from... maybe add slash ("/"), minus ("-"), and dot (".").
>
> Do you think the first character should be allowed to be a number? I'd stick to the complete java identifier definition here as well.
>
>
> On 2012-04-19, at 16:48, Nigel Deakin wrote:
>
>> Please see below:
>>
>> On 17/04/2012 17:58, Nigel Deakin wrote:
>>> I have created this JIRA issue:
>>> http://java.net/jira/browse/JMS_SPEC-94
>>>
>>> Define what characters are valid in a durable (or shared subscription) name
>>> ---------------------------------------------------------------------------
>>>
>>> The JMS 1.1 specification does not specify what characters are valid in a durable subscription name.
>>> It is proposed that the JMS 2.0 specification defines a minimum set of characters which are valid in a durable or
>>> non-durable subscription name.
>>>
>>> This is needed to allow portable applications to be created. It is also needed because EJB_SPEC-41 states that if a MDB
>>> is defined with {{subscriptionDurability}} set to {{Durable}} but {{subscriptionName}} is not set then the container
>>> will automatically set {{subscriptionName}} to a suitably unique global name of the MDB, and the container vendor needs
>>> to be sure that the name it generates will always be a legal subscription name.
>>>
>>> ---------------------------------------------------------------------------
>>>
>>> Over on the EJB expert group they're discussing how to construct the default durable subscription name used for a MDB,
>>> and one suggestion included "/" characters.
>>>
>>> Does anyone know of any existing JMS providers which impose restrictions on what characters are valid?
>>
>> So far I've discovered that
>> 1. Oracle GlassFish Message Queue has no restrictions
>> 2. Oracle Weblogic JMS does not allow the use of comma, equals, colon, asterisk, percent and question mark.
>>
>> It has been suggested to me that we could specify that characters that satisfy
>> java.lang.Character.isJavaIdentifierPart(char ch) would be permitted.
>>
>> Any views?
>>
>> Nigel
>