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 ) ; }
Creates a message producer using the context s session and destination .