blob: 415eb5f397774a70199dafc1920ca8964931c255 [file] [log] [blame]
<div class="wiki-content maincontent"><h2 id="LoggingawarningifyouforgettostartaConnection-LoggingawarningifyouforgettostartaConnection">Logging a warning if you forget to start a Connection</h2>
<p>A <em>very</em> common gotcha when working with JMS is forgetting to start the JMS connection, creating a consumer and not having it receive any messages. I myself have tripped up over this one many many times! <img class="emoticon emoticon-smile" src="https://cwiki.apache.org/confluence/s/en_GB/5997/6f42626d00e36f53fe51440403446ca61552e2a2.1/_/images/icons/emoticons/smile.png" data-emoticon-name="smile" alt="(smile)"></p>
<p>To try and help diagnose this mistake and give you an early warning by default ActiveMQ 4.2 detects this and generates a handy warning message telling you to call the <a shape="rect" class="external-link" href="http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Connection.html#start()" rel="nofollow">Connection.start() method</a> on the JMS connection.</p>
<p>For more details on <a shape="rect" class="external-link" href="https://issues.apache.org/activemq/browse/AMQ-1253">this feature</a> see the discussion of the <strong>warnAboutUnstartedConnectionTimeout</strong> property on the <a shape="rect" href="connection-configuration-uri.html">Connection Configuration URI</a></p></div>