Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

When does our JMS application actually initiates/starts the connection with queue?

Posts: 14
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have created a JMS application to interface with MQ series for sending/receiving messages. The application works fine.

I was wondering when does our application actually interfaces [starts a connection] with MQ

Is it when after we create the queue session object or the queue connection object or when we call the start() method from queueConnection reference?

There are "for loops" inside message sending program, which keep sending messages to same queue & queue manager until a condition is reached. So i was worried if i am opening the connection un-necessarily every time when i send each message for each iteration!

I wanted to make sure that i use the same session and connection for each iteration in the loop because the queue and queue manager name are the same! I assume that creating connection/sessions each time will degrade performance and its not necessary!

So in the above shown code, at which line the actual connection with MQ starts?

Is it Line no 6 or 7 or 8 or 12 or 13?

I can put that line top of the message sending method once for all, so that i am avoiding performance issues!.
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic