jsr343-experts@jms-spec.java.net

[jsr343-experts] Re: (JMS_SPEC-45) Clarify and improve Connection.createSession

From: RĂ¼diger zu Dohna <ruediger.dohna_at_1und1.de>
Date: Mon, 26 Sep 2011 08:55:09 +0200

On 23.09.2011 16:34, Nigel Deakin wrote:
> ...further new method ... Session createSession()
> Any comments?

Exquisit simplification... +1

> Separately, John suggested:
>> Could your spec change perhaps use an enum to describe the sessionMode as well?
>
> If this has been a new API then an enum would have definitely been the right thing, and my initial reaction was to agree
> with John's proposal. However another EG member has pointed out that since we already have four static constants
> (Session.AUTO_ACKNOWLEDGE etc) adding four enum values which would effectively duplicate these would unnecessarily
> complicate the API. I'm therefore inclined to stick with the existing four static constants. Does anyone else have any
> particular views on this?

I'd prefer the enum, too. The old constants could be marked as
deprecated and eventually removed. All other methods that take such an
int, would have to be marked as deprecated as well and get a new variant
with the enum. I'm all for cleaning up APIs!