code: protected void createProducer(ProducerConnectionContext context) throws JMSException {
          if (context == null) {
              throw new IllegalStateException("The context is null");
          }
          Session session = context.getSession();
          if (session == null) {
              throw new IllegalStateException("The context had a null session");
          }
          Destination dest = context.getDestination();
          if (dest == null) {
              throw new IllegalStateException("The context had a null destination");
          }
          MessageProducer producer = session.createProducer(dest);
          context.setMessageProducer(producer);
      }
docs: Creates a message producer using the context's session and destination.
  
  @param context the context where the new producer is stored
  @throws JMSException any error
  @throws IllegalStateException if the context is null or the context's session is null
  or the context's destination is null