Results 1 to 2 of 2

Thread: JmsTemplate102 just like using JmsTemplate??

  1. #1
    Join Date
    Aug 2004
    Location
    Monterrey, NL, México
    Posts
    4

    Default 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. #2
    Join Date
    Sep 2004
    Location
    San Diego, CA
    Posts
    49

    Default

    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

Similar Threads

  1. Replies: 6
    Last Post: Oct 10th, 2012, 03:15 PM
  2. Replies: 11
    Last Post: Jul 26th, 2007, 11:31 AM
  3. JmsTemplate and Acknowledge
    By mbarlotta in forum JMS
    Replies: 3
    Last Post: Nov 14th, 2005, 07:09 PM
  4. Is JmsTemplate102 Thread Safe
    By pdelahun in forum JMS
    Replies: 2
    Last Post: Apr 18th, 2005, 10:32 AM
  5. Replies: 0
    Last Post: Mar 11th, 2005, 02:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •