Announcement Announcement Module
Collapse
No announcement yet.
JmsTemplate102 just like using JmsTemplate?? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JmsTemplate102 just like using JmsTemplate??

    Yesterday I made a JMS test with Weblogic 8.1 and found this strange thng: Though I was using the following code, copied from the docs:

    j
    Code:
    t = new JmsTemplate102(connFactory, false);
            jt.send(queue, new MessageCreator() {
                public Message createMessage(Session session) throws JMSException {
                    return session.createTextMessage(message);
                }
     });
    I could see in the stack trace that the code that was invoked was on JmsTemplate, not on JmsTemplate102, with a call on getConnectionFactory().createConnection() being consequently made. Weblogic is only 1.0.2 compliant when out-of-the-box, so this causes an error.

    I'm using Spring 1.2RC1, and just wanted to know that do you think...

    Thanks,
    Alejandro Escalante Medina

  • #2
    JmsTemplate102 does extend JmsTemplate; certain key methods are overridden for 1.0.2 style invocation (most notably createConnection/Session/Producer and doSend).

    You might include your stack trace, but problems will occur if the connection factory you specify in the constructor is not an instance of QueueConnectionFactory, but is instead a generic JMS 1.1 ConnectionFactory. Check the binding in Weblogic's JNDI tree.

    Tim

    Comment

    Working...
    X