title: ActiveMQ Connection is not working
body: <p>I created the ActiveMQ Connection with ActiveMQConnectionFactory,</p>
  
  <pre><code>connectionFactory = new ActiveMQConnectionFactory("nio://0.0.0.0:" + activeMqPort);
  connection = connectionFactory.createConnection();
  connection.start();
  </code></pre>
  
  <p>Later some point of time I am using the connection to get the session:</p>
  
  <pre><code>Session session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
  </code></pre>
  
  <p>While creating session from Connection it will fail with a <code>NullPointerException</code> (connection is null), </p>
  
  <p>PS: Connection was working before, suddenly its null. 
  Can anyone explain  it to me when this will happen and how to fix this ?</p>