aspose file tools
The moose likes EJB and other Java EE Technologies and the fly likes JMS: Why are these examples working when I'm not calling connection.start() Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "JMS: Why are these examples working when I Watch "JMS: Why are these examples working when I New topic
Author

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

Rick Reumann
Ranch Hand

Joined: Apr 03, 2001
Posts: 281
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()
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: JMS: Why are these examples working when I'm not calling connection.start()
 
Similar Threads
JMS conceptual doubt
WAS 5.0 ND and JMS
NX:Client crashed cause deadlock in LockManager
JMS vs MQSeries
JBoss Messanging: keeping message in inbox queue until it will be processed successfully - possible?