title: JMSContext NullPointer Exception - wildfly 8.2.0 default queue
body: <p>I am trying to send messages to my default queue in wildfly and when i invoke "sendMessage()"  the JMSContext is giving me a null pointer exception. what can i fix ? </p>
  
  <pre><code>public class SendMsg {
  
  
  @Resource(lookup = "java:/ConnectionFactory")
   ConnectionFactory connectionFactory;
  
  
  JMSContext context=connectionFactory.createContext();
  
  @Resource(mappedName="java:/jms/queue/test")
  Queue queue;
  
  public void sendMessage(String message) {
      System.out.println("fancy beans");
      context.createProducer().send(queue, message);
  }
  </code></pre>
  
  <p>}</p>