jruby-jms 1.2.0-java → 1.3.0-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c58dfbbab766a5b4ad1f7f383e256294e658089f
4
- data.tar.gz: 7ec282e9a6f7b9ab24fa9502be32c7a16f66a2ea
2
+ SHA256:
3
+ metadata.gz: '07213922daa10ccc443fc32e7adb462a83f691b1b3af0888ef77028a929db96f'
4
+ data.tar.gz: ebaa48906a3c4f47f3f833b0e614f68f23383c0a4583ddf7445d86be7cdcbcfa
5
5
  SHA512:
6
- metadata.gz: 7099c5bc513f3616e5a01073671a2e40cc33b7a697e6807cf7c4ada87d76ae61a8c0056397e5bc72bfb6aeeac5df58f448c2c9946d20fc64580884b7b6db2c77
7
- data.tar.gz: bda4d42a7fa8f4f299e9120042caf7e707117fe755628edd7ad167ec4ba65a9a0c1f053be5ff4de54b8a2f3f99a8b7e4ad8dceacb6f47ea1aa11c692c3abe636
6
+ metadata.gz: 54ad524cf822636ab016255214ad4f3928bc7f5ed6dcfe8b76a02972cac6a130d551dee388b03e800ea2c975b4dcf03d14d7c8bf20d2a16392b53f752343cf3f
7
+ data.tar.gz: b9624872fa1b776923df58d15896fb3296aed65088ae2d7428d519a4804966481302f5898fdfce4c5b71e59f77147ceda5d7f0d658dc73ea6a2717170e4d0fb3
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
- ## jruby-jms
1
+ # jruby-jms
2
+ ![](https://img.shields.io/gem/dt/jruby-jms.svg) ![](https://img.shields.io/badge/status-production%20ready-blue.svg)
2
3
 
3
4
  * http://github.com/reidmorrison/jruby-jms
4
5
 
@@ -160,9 +161,17 @@ queue or topic will be passed to the block.
160
161
 
161
162
  ## Logging
162
163
 
163
- jruby-jms detects the logging available in the current environment.
164
- When running under Rails it will use the Rails logger, otherwise it will use the
165
- standard Ruby logger. The logger can also be replaced by calling `JMS.logger=`
164
+ jruby-jms uses [Semantic Logger](http://reidmorrison.github.io/semantic_logger/) for logging since it is
165
+ fully thread-aware, uses in-memory queue based logging for performance, and has several other useful features.
166
+
167
+ To enable Semantic Logger in a rails logger, include the gem [rails_semantic_logger](http://reidmorrison.github.io/semantic_logger/rails.html)
168
+
169
+ For standalone installations:
170
+
171
+ ```ruby
172
+ SemanticLogger.add_appender(file_name: 'test.log', formatter: :color)
173
+ SemanticLogger.default_level = :info
174
+ ```
166
175
 
167
176
  ## Dependencies
168
177
 
@@ -184,22 +193,10 @@ jruby-jms has been tested against JRuby 1.7, and JRuby 9.0.0.0
184
193
 
185
194
  ## Versioning
186
195
 
187
- ## Author
188
-
189
- Reid Morrison :: reidmo@gmail.com :: @reidmorrison
190
-
191
- ## License
196
+ This project uses [Semantic Versioning](http://semver.org/).
192
197
 
193
- Copyright 2008 - 2015 J. Reid Morrison
194
-
195
- Licensed under the Apache License, Version 2.0 (the "License");
196
- you may not use this file except in compliance with the License.
197
- You may obtain a copy of the License at
198
+ ## Author
198
199
 
199
- http://www.apache.org/licenses/LICENSE-2.0
200
+ [Reid Morrison](https://github.com/reidmorrison)
200
201
 
201
- Unless required by applicable law or agreed to in writing, software
202
- distributed under the License is distributed on an "AS IS" BASIS,
203
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204
- See the License for the specific language governing permissions and
205
- limitations under the License.
202
+ [Contributors](https://github.com/reidmorrison/jruby-jms/graphs/contributors)
@@ -483,17 +483,14 @@ module JMS
483
483
  # see regular session parameters from: JMS::Connection#initialize
484
484
  #
485
485
  # Additional parameters for controlling the session pool itself
486
- # :pool_name Name of the pool as it shows up in the logger.
487
- # Default: 'JMS::SessionPool'
488
486
  # :pool_size Maximum Pool Size. Default: 10
489
487
  # The pool only grows as needed and will never exceed
490
488
  # :pool_size
491
489
  # :pool_warn_timeout Number of seconds to wait before logging a warning when a
492
490
  # session in the pool is not available. Measured in seconds
493
491
  # Default: 5.0
494
- # :pool_logger Supply a logger that responds to #debug, #info, #warn and #debug?
495
- # For example: Rails.logger
496
- # Default: None
492
+ # :pool_name Name of the pool as it shows up in the logger.
493
+ # Default: 'JMS::SessionPool'
497
494
  # Example:
498
495
  # session_pool = connection.create_session_pool(config)
499
496
  #
@@ -9,14 +9,29 @@ module JMS::MessageConsumer
9
9
  # Note: Messages may still be on the queue, but the broker has not supplied any messages
10
10
  # in the time interval specified
11
11
  # Default: 0
12
+ # :buffered_message - consume Oracle AQ buffered message
13
+ # Default: false
12
14
  def get(params={})
13
15
  timeout = params[:timeout] || 0
16
+ buffered_message = params[:buffered_message] || false
14
17
  if timeout == -1
15
- self.receive
18
+ if buffered_message
19
+ self.bufferReceive
20
+ else
21
+ self.receive
22
+ end
16
23
  elsif timeout == 0
17
- self.receiveNoWait
24
+ if buffered_message
25
+ self.bufferReceiveNoWait
26
+ else
27
+ self.receiveNoWait
28
+ end
18
29
  else
19
- self.receive(timeout)
30
+ if buffered_message
31
+ self.bufferReceive(timeout)
32
+ else
33
+ self.receive(timeout)
34
+ end
20
35
  end
21
36
  end
22
37
 
@@ -37,7 +37,7 @@ module JMS
37
37
  @message_count += 1
38
38
  @last_time = Time.now
39
39
  end
40
- logger.benchmark_debug('Message processed') do
40
+ logger.measure_debug('Message processed') do
41
41
  @proc.call message
42
42
  end
43
43
  rescue SyntaxError, NameError => exc
@@ -1,3 +1,3 @@
1
1
  module JMS #:nodoc
2
- VERSION = '1.2.0'
2
+ VERSION = '1.3.0'
3
3
  end
@@ -11,8 +11,8 @@ require 'jms'
11
11
 
12
12
  Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
13
13
 
14
- SemanticLogger.add_appender('test.log', &SemanticLogger::Appender::Base.colorized_formatter)
15
- SemanticLogger.default_level = :trace
14
+ SemanticLogger.add_appender(file_name: 'test.log', formatter: :color)
15
+ SemanticLogger.default_level = :trace
16
16
 
17
17
  # Set Log4J properties file so that it does not need to be in the CLASSPATH
18
18
  java.lang.System.properties['log4j.configuration'] = 'test/log4j.properties'
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby-jms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: java
6
6
  authors:
7
7
  - Reid Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-29 00:00:00.000000000 Z
11
+ date: 2019-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - '>='
16
+ - - ">="
17
17
  - !ruby/object:Gem::Version
18
18
  version: '0'
19
19
  name: gene_pool
@@ -21,13 +21,13 @@ dependencies:
21
21
  type: :runtime
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - '>='
30
+ - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: '0'
33
33
  name: semantic_logger
@@ -35,10 +35,11 @@ dependencies:
35
35
  type: :runtime
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: jruby-jms is a complete JRuby API into Java Messaging Specification (JMS) V1.1. For JRuby only.
41
+ description: jruby-jms is a complete JRuby API into Java Messaging Specification (JMS)
42
+ V1.1. For JRuby only.
42
43
  email:
43
44
  - reidmo@gmail.com
44
45
  executables: []
@@ -75,7 +76,7 @@ files:
75
76
  - test/test_helper.rb
76
77
  homepage: https://github.com/reidmorrison/jruby-jms
77
78
  licenses:
78
- - Apache License V2.0
79
+ - Apache-2.0
79
80
  metadata: {}
80
81
  post_install_message:
81
82
  rdoc_options: []
@@ -83,25 +84,25 @@ require_paths:
83
84
  - lib
84
85
  required_ruby_version: !ruby/object:Gem::Requirement
85
86
  requirements:
86
- - - '>='
87
+ - - ">="
87
88
  - !ruby/object:Gem::Version
88
89
  version: '0'
89
90
  required_rubygems_version: !ruby/object:Gem::Requirement
90
91
  requirements:
91
- - - '>='
92
+ - - ">="
92
93
  - !ruby/object:Gem::Version
93
94
  version: '0'
94
95
  requirements: []
95
96
  rubyforge_project:
96
- rubygems_version: 2.4.8
97
+ rubygems_version: 2.7.6
97
98
  signing_key:
98
99
  specification_version: 4
99
100
  summary: JRuby interface into JMS
100
101
  test_files:
101
- - test/connection_test.rb
102
- - test/jms.yml
103
- - test/log4j.properties
104
- - test/message_test.rb
105
- - test/session_pool_test.rb
106
102
  - test/session_test.rb
103
+ - test/session_pool_test.rb
104
+ - test/message_test.rb
105
+ - test/connection_test.rb
107
106
  - test/test_helper.rb
107
+ - test/log4j.properties
108
+ - test/jms.yml