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 (ditto for a Jms102TopicProducer as well I guess,
although Lingo doesn't appear to support topics at the moment?)

On top of that there are a couple of static methods that might get in
the way of separating the rest of the codebase from the specific JMS
implementaiton, but it shouldn't be too hard.

What do you think?

James W.
--

photos: http://flickr.com/photos/jim links: http://del.icio.us/jim.mcslim 
blogs: http://www.bloglines.com/public/jimmcslim

Reply via email to