Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS: Why are these examples working when I'm not calling connection.start()

 
Rick Reumann
Ranch Hand
Posts: 281
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the API on Connection API and from other docs I've seen, it is mentioned that:

"When a Connection is created it is in stopped mode. That means that no messages are being delivered."

"It is typical to leave the Connection in stopped mode until setup is complete. At that point the Connection's start() method is called and messages begin arriving at the Connection's consumers."

What I don't understand is I actually have some code where I do not ever call connection.start() in either my client or my MDB and everything works. It's actually an example that I followed from the 'JBoss At Work: A Practical Guide' book. (The 'EJB3 In Action' book also does not mention ever calling connection.start() either, so I'm confused what's going on. I figured maybe when connection.close() was called it automatically started the flow of messages, but the API doesn't mention that.

How are these examples working without ever explicitly calling connection.start()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic