def session(params={}, &block)
      raise(ArgumentError, 'Missing mandatory Block when calling JMS::Connection#session') unless block
      session = self.create_session(params)
      begin
        block.call(session)
      ensure
        session.close
      end
    end
def session(params={}, &block)
      raise(ArgumentError, 'Missing mandatory Block when calling JMS::Connection#session') unless block
      session = self.create_session(params)
      begin
        block.call(session)
      ensure
        session.close
      end
    end
Create a session over this connection.
 It is recommended to create separate sessions for each thread
 If a block of code is passed in, it will be called and then the session is automatically
 closed on completion of the code block

 Parameters:
  transacted: [true|false]
      Determines whether transactions are supported within this session.
      I.e. Whether commit or rollback can be called
      Default: false
      Note: :options below are ignored if this value is set to :true

  options: any of the JMS::Session constants:
     Note: :options are ignored if transacted: true
     JMS::Session::AUTO_ACKNOWLEDGE
        With this acknowledgment mode, the session automatically acknowledges
        a client's receipt of a message either when the session has successfully
        returned from a call to receive or when the message listener the session has
        called to process the message successfully returns.
     JMS::Session::CLIENT_ACKNOWLEDGE
        With this acknowledgment mode, the client acknowledges a consumed
        message by calling the message's acknowledge method.
     JMS::Session::DUPS_OK_ACKNOWLEDGE
        This acknowledgment mode instructs the session to lazily acknowledge
        the delivery of messages.
     JMS::Session::SESSION_TRANSACTED
        This value is returned from the method getAcknowledgeMode if the
        session is transacted.
     Default: JMS::Session::AUTO_ACKNOWLEDGE