Permalink
Browse files

Release V1.0.0

Support latest Gene Pool
Test with ActiveMQ 5.7
  • Loading branch information...
1 parent 4ae624c commit 99248ca47e9b5867773d8a6464d0689ae1a34b56 @reidmorrison committed Oct 21, 2012
Showing with 30 additions and 7 deletions.
  1. +6 −2 Rakefile
  2. +1 −0 lib/jms.rb
  3. +9 −4 lib/jms/session_pool.rb
  4. +3 −0 lib/jms/version.rb
  5. +11 −1 test/jms.yml
View
@@ -1,17 +1,21 @@
+lib = File.expand_path('../lib/', __FILE__)
+$:.unshift lib unless $:.include?(lib)
+
raise "jruby-jms must be built with JRuby: try again with `jruby -S rake'" unless defined?(JRUBY_VERSION)
require 'rake/clean'
require 'rake/testtask'
require 'date'
require 'java'
+require 'jms/version'
desc "Build gem"
task :gem do |t|
gemspec = Gem::Specification.new do |s|
s.name = 'jruby-jms'
- s.version = '0.11.2'
+ s.version = JMS::VERSION
s.author = 'Reid Morrison'
- s.email = 'rubywmq@gmail.com'
+ s.email = 'reidmo@gmail.com'
s.homepage = 'https://github.com/reidmorrison/jruby-jms'
s.date = Date.today.to_s
s.description = 'JRuby-JMS is a Java and Ruby library that exposes the Java JMS API in a ruby friendly way. For JRuby only.'
View
@@ -15,5 +15,6 @@
################################################################################
require 'java'
+require 'jms/version'
require 'jms/logging'
require 'jms/connection'
View
@@ -19,9 +19,12 @@ module JMS
# :pool_size Maximum Pool Size. Default: 10
# The pool only grows as needed and will never exceed
# :pool_size
+ # :pool_timeout Number of seconds to wait before raising a TimeoutError
+ # if no sessions are available in the poo
+ # Default: 60
# :pool_warn_timeout Number of seconds to wait before logging a warning when a
- # session in the pool is not available. Measured in seconds
- # Default: 5.0
+ # session in the pool is not available
+ # Default: 5
# :pool_logger Supply a logger that responds to #debug, #info, #warn and #debug?
# For example: Rails.logger
# Default: JMS.logger
@@ -38,9 +41,11 @@ def initialize(connection, params={})
logger = session_params[:pool_logger] || JMS.logger
# Define how GenePool can create new sessions
@pool = GenePool.new(
- :name => session_params[:pool_name] || self.class.name,
- :pool_size => session_params[:pool_size] || 10,
+ :name => session_params[:pool_name] || self.class.name,
+ :pool_size => session_params[:pool_size] || 10,
:warn_timeout => session_params[:pool_warn_timeout] || 5,
+ :timeout => session_params[:pool_timeout] || 60,
+ :close_proc => nil,
:logger => logger) do
connection.create_session(session_params)
end
View
@@ -0,0 +1,3 @@
+module JMS #:nodoc
+ VERSION = "1.0.0"
+end
View
@@ -11,7 +11,8 @@
#default: hornetq222
#default: hornetq225
#default: activemq543
-default: activemq551
+#default: activemq551
+default: activemq570
#default: webspheremq6
#default: webspheremq7
@@ -33,6 +34,15 @@ activemq551:
:queue_name: TestQueue
:topic_name: TestTopic
+activemq570:
+ :factory: org.apache.activemq.ActiveMQConnectionFactory
+ :broker_url: tcp://localhost:61616
+ :require_jars:
+ - ~/Applications/apache-activemq-5.7.0/activemq-all-5.7.0.jar
+ - ~/Applications/apache-activemq-5.7.0/lib/optional/log4j-1.2.17.jar
+ :queue_name: TestQueue
+ :topic_name: TestTopic
+
hornetq225:
# Connect to a local HornetQ Broker using JNDI
:jndi_name: /ConnectionFactory

0 comments on commit 99248ca

Please sign in to comment.