lib/hornetq/client/session_pool.rb in jruby-hornetq-0.4.0 vs lib/hornetq/client/session_pool.rb in jruby-hornetq-0.5.0.alpha

- old
+ new

@@ -56,15 +56,15 @@ # The session is automatically returned to the pool once the block completes def session(&block) @pool.with_connection &block end - # Obtain a session from the pool and create a ClientConsumer. - # Pass both into the supplied block. + # Obtain a session from the pool and create a ClientConsumer. + # Pass both into the supplied block. # Once the block is complete the consumer is closed and the session is # returned to the pool. - # + # # See HornetQ::Client::ClientConsumer for more information on the consumer # parameters # # Example # session_pool.consumer('MyQueue') do |session, consumer| @@ -80,16 +80,16 @@ ensure consumer.close end end end - - # Obtain a session from the pool and create a ClientProducer. - # Pass both into the supplied block. + + # Obtain a session from the pool and create a ClientProducer. + # Pass both into the supplied block. # Once the block is complete the consumer is closed and the session is # returned to the pool. - # + # # See HornetQ::Client::ClientProducer for more information on the producer # parameters # # Example # session_pool.producer('MyAddress') do |session, producer| @@ -106,16 +106,16 @@ ensure producer.close if producer end end end - + # Obtain a session from the pool and create a Client::Requestor. - # Pass both into the supplied block. + # Pass both into the supplied block. # Once the block is complete the requestor is closed and the session is # returned to the pool. - # + # # See HornetQ::Client::Requestor for more information on the requestor # # Example # session_pool.requestor(params) do |session, requestor| # .... @@ -129,16 +129,16 @@ ensure requestor.close end end end - + # Obtain a session from the pool and create a Client::Server. - # Pass both into the supplied block. + # Pass both into the supplied block. # Once the block is complete the requestor is closed and the session is # returned to the pool. - # + # # See HornetQ::Client::Server for more information on the server # # Example # session_pool.server(queue, timeout) do |session, server| # .... @@ -152,23 +152,23 @@ ensure server.close end end end - + # Immediately Close all sessions in the pool and release from the pool - # - # TODO: Allow an option to wait for active sessions to be returned before + # + # TODO: Allow an option to wait for active sessions to be returned before # closing def close @pool.each do |s| #@pool.remove(s) s.close #@pool.remove(s) end end - + end - + end end \ No newline at end of file