jsr343-experts@jms-spec.java.net

[jsr343-experts] Re: [jms-spec users] Re: (JMS_SPEC-51) Change Session.createDurableSubscriber() to return a MessageConsumer

From: <reza_rahman_at_lycos.com>
Date: Mon, 19 Sep 2011 14:01:33 +0000 (GMT)
Nigel,

So, all of this kind of code:

TopicSubscriber subscriber = session.createDurableSubscriber();

Would now have to change to this, right?:

MessageConsumer consumer = session.createDurableSubscriber();

The problem is that TopicSubscriber->MessageConsumer, so the existing code would begin to have compilation failures?

Cheers,
Reza


Sep 19, 2011 09:36:15 AM, jsr343-experts@jms-spec.java.net wrote:
On 16/09/2011 19:58, reza_rahman@lycos.com wrote:


What kind of compatibility would this break? Existing application code would not need to be changed.

Nigel


Sep 16, 2011 02:35:46 PM, jsr343-experts@jms-spec.java.net wrote:
I have logged the following JIRA issue:
http://java.net/jira/browse/JMS_SPEC-51

Here is the description, which I think is self-explanatory (I originally raised this as part of JMS_SPEC-47, but I am
now separating it out to a separate trackable issue).

There were no objections when I first suggested this, but if anyone has any comments please make them now.

----------------------
In JMS 1.1 the method Session.createDurableSubscriber() returns a TopicSubscriber, not a MessageConsumer.

This is the only "domain-independent" method in the whole JMS 1.1 API which depends on a "domain-specific" interface.
This dependency prevents the "domain-specific" interfaces being removed from JMS as proposed in JMS_SPEC-47

It is therefore proposed to modify this method to return a MessageConsumer. Since this is a supertype of TopicSubscriber
it should not break existing applications.
----------------------


Nigel