axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Stafford <jcst...@apl.jhu.edu>
Subject SimpleJMSListener not using Connector props for Subscription
Date Wed, 28 Jan 2004 04:45:44 GMT
I am havimg problems getting my selector registered for my 
SimpleJMSListener. The problem appears to be in the fact that the 
start() method does not pass in the HashMap connector properties, with 
the selector, to the endpoint.registerListener() call. It uses the 
version of the call that accepts no additional properties.

    public void start()
        throws Exception
    {
        endpoint.registerListener(this);
        connector.start();
    }

The version of endpoint.registerListener that accepts the HashMap passes 
these to the Subscription.
    protected Subscription createSubscription(MessageListener listener,
                                              HashMap properties)
    {
        return new Subscription(listener, this, properties);
    }

The Subscription extracts the selector from the properties.
    Subscription(MessageListener listener,
                 JMSEndpoint endpoint,
                 HashMap properties)
    {
        m_listener = listener;
        m_endpoint = endpoint;
        m_messageSelector = MapUtils.removeStringProperty(
                                            properties,
                                            JMSConstants.MESSAGE_SELECTOR,
                                            null);
        ...

I would override the SimpleJMSListener.start() method with a version 
that used the properties, but the endpoint and other variables are all 
declared private.

Do you agree that this should be changed? or should I just re-write the 
SimpleJMSListener as my own class and push the pedals the way I want to?



Mime
View raw message