0
votes

For a Spring 3.x application deployed in an application server, I am wondering about the general pieces that need to be set up.

Would I make a jms connection in the application server, and would that connection be queue specific? For instance, in code, I'm assuming that some Spring bean would have jmsTemplate injected, and the jmsTemplate would be configured in a config file to use the jndi connection mentioned earlier.

Then, jmsTemplate would send a message using its "send" method. I've seen some examples where, in code, a queue is specified, and that is confusing me.

If I set up a jms connection in an application server, would I necessarily need to provide a queue name; or, is the jms connection tied to a queue?

1

1 Answers

0
votes

No, connections are not tied to queues.

Typically, with WebSphere and similar, you would declare the Queue (destination) in the WAS admin (as well as the connection factory) and use JNDI to look it up. You would then inject that destination into the JmsTemplate as the default destination.