JMS: Why are these examples working when I'm not calling connection.start()
posted 8 years ago
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()