On 6 Dec 2005, at 09:12, James Strachan wrote:
Hey James

On 6 Dec 2005, at 05:41, James Webster wrote:
Hey guys,

After raising the 'no support for JMS 1.0.2' issue
(http://jira.codehaus.org/browse/LINGO-10) I thought I might have a
crack at fixing it myself.

My thoughts (and I've had a first cut at the code as well) are that
perhaps the direct access to the JMS Connection, Session and
MessageProducer object should be contained within what is currently
DefaultJmsProducer, and the following interface extracted...

public interface JmsProducer {

    public Session getSession();
    public MessageProducer getMessageProducer();
    public void close() throws JMSException;
    Session createSession(boolean b, int autoAcknowledge) throws
    JMSException;
    MessageConsumer createConsumer(Destination destination, String
    messageSelector) throws JMSException;
    MessageConsumer createConsumer(Destination destination) throws
    JMSException;
    Destination createQueue(String name) throws JMSException;
    void send(Destination jmsReplyTo, Message responseMessage) throws
    JMSException;
    void send(Destination destination, Message message, int
    deliveryMode, int priority, long timeToLive) throws JMSException;
    TemporaryQueue createTemporaryQueue() throws JMSException;
}

This should make it easy to implement a Jms102QueueProducer that casts
Destination, MessageProducer and Connection to Queue, QueueSender and
QueueConnection

Agreed. I just made a minor refactor on MessageProducer to add a couple of send() methods; the code was doing producer.getMessageProducer().send(...); which won't work in 1.0.2b - so now the send method is on the JmsProducer so you can implement a queue and topic version of those.

Apologies - I misread the above (not enough coffee) - I realise now you totally grok the issue and have just about got it fixed - so sorry. I can rollback my changes if it makes it easier for you - you're on exactly the right lines.


James
-------
http://radio.weblogs.com/0112098/

Reply via email to