geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GERONIMO-6559) geronimo-jms_2.0_spec missed update for TopicRequestor destination validation on create
Date Fri, 02 Dec 2016 17:27:58 GMT
Timothy Bish created GERONIMO-6559:
--------------------------------------

             Summary: geronimo-jms_2.0_spec missed update for TopicRequestor destination validation
on create
                 Key: GERONIMO-6559
                 URL: https://issues.apache.org/jira/browse/GERONIMO-6559
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: specs
            Reporter: Timothy Bish


The implementation of TopicRequestor does not validate that Topic supplied to the constructor
leading it to not throw the expected InvalidDestinationException 

This was pointed out in the JMS_SPEC issues for JMS 2.0 and fixed for the 2.0 reference implementation.
https://java.net/jira/browse/JMS_SPEC-78

Code in question:
{code}
    public TopicRequestor(TopicSession session, Topic topic)
        throws JMSException {
        super();
        setSession(session);
        setTopic(topic);
        setTemporaryTopic(session.createTemporaryTopic());
        setPublisher(session.createPublisher(topic));
        setSubscriber(session.createSubscriber(getTemporaryTopic()));
}
{code}

As opposed to the QueueRequestor 
{code}
    public QueueRequestor(QueueSession session, Queue queue)
        throws JMSException
    {
        super();

        if(queue == null) {
            throw new InvalidDestinationException("Invalid queue");
        }
        
        setSession(session);
        setTemporaryQueue(session.createTemporaryQueue());
        setSender(session.createSender(queue));
        setReceiver(session.createReceiver(getTemporaryQueue()));
    }
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message