Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Release V1.0.0
Browse files Browse the repository at this point in the history
Support latest Gene Pool
Test with ActiveMQ 5.7
  • Loading branch information
reidmorrison committed Oct 21, 2012
1 parent 4ae624c commit 99248ca
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 7 deletions.
8 changes: 6 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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.'
Expand Down
1 change: 1 addition & 0 deletions lib/jms.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
################################################################################

require 'java'
require 'jms/version'
require 'jms/logging'
require 'jms/connection'
13 changes: 9 additions & 4 deletions lib/jms/session_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions lib/jms/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module JMS #:nodoc
VERSION = "1.0.0"
end
12 changes: 11 additions & 1 deletion test/jms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#default: hornetq222
#default: hornetq225
#default: activemq543
default: activemq551
#default: activemq551
default: activemq570
#default: webspheremq6
#default: webspheremq7

Expand All @@ -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
Expand Down

0 comments on commit 99248ca

Please sign in to comment.