Saturday, February 2, 2002 05:30 AM
As I understand it, you are attempting to pre-lookup all the Queue objects in JNDI before you start running, so you isssue a series of lookup(name) calls to retrieve the Queue objects. However, when you actually attempt to use the the queue objects that you retrieved, you believe that no messages are sent.
What you are trying to do seems ok, but lets just add a little detail.
- Did you retrieve a QueueConnectionFactory from JNDI ?
QueueConnectionFactory qcf = (QueueConnectionFactory)jndiContext.lookup(name);
- Did you create a QueueConnection ?
QueueConnection connection = qcf.createQueueConnection();
- Did you create a QueueSession ?
QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
- Did you create a QueueSender using the Queue you retrieved from JNDI ?
QueueSender sender = session.createSender(queueFromJNDI);
- Did you use the sender to send the messages ?
If all these are more or less right, post your code and let't take a look.