def producer(params, &block)
      session do |s|
        begin
          producer = s.producer(params)
          block.call(s, producer)
        ensure
          producer.close if producer
        end
      end
    end
def producer(params, &block)
      session do |s|
        begin
          producer = s.producer(params)
          block.call(s, producer)
        ensure
          producer.close if producer
        end
      end
    end
Obtain a session from the pool and create a MessageProducer.
 Pass both into the supplied block.
 Once the block is complete the producer is closed and the session is
 returned to the pool.

 Parameters:
   queue_name: [String] Name of the Queue to return
               [Symbol] Create temporary queue
                  Mandatory unless :topic_name is supplied
     Or,
   topic_name: [String] Name of the Topic to write to or subscribe to
               [Symbol] Create temporary topic
                  Mandatory unless :queue_name is supplied
     Or,
   destination: [javaxJms::Destination] Destination to use

 Example
   session_pool.producer(queue_name: 'ExampleQueue') do |session, producer|
     producer.send(session.message("Hello World"))
   end