jruby-hornetq 0.4.0 → 0.5.0.alpha
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +9 -0
- data/Gemfile.lock +30 -0
- data/HISTORY.md +6 -0
- data/README.md +33 -35
- data/Rakefile +14 -9
- data/examples/advanced/batch_client.rb +8 -8
- data/examples/advanced/batch_requestor_pattern.rb +34 -34
- data/examples/advanced/bytes_producer.rb +3 -3
- data/examples/advanced/client.rb +5 -5
- data/examples/advanced/client_session_pooling.rb +3 -3
- data/examples/advanced/consume_on_message.rb +5 -5
- data/examples/advanced/consumer.rb +2 -2
- data/examples/advanced/multi_client.rb +3 -3
- data/examples/advanced/producer.rb +3 -3
- data/examples/advanced/server.rb +4 -4
- data/examples/client-server/client.rb +4 -4
- data/examples/client-server/server.rb +4 -4
- data/examples/producer-consumer/consume_all.rb +2 -2
- data/examples/producer-consumer/consume_on_message.rb +5 -5
- data/examples/producer-consumer/consumer.rb +2 -2
- data/examples/producer-consumer/producer.rb +3 -3
- data/examples/resque/hornetq_job.rb +19 -19
- data/examples/resque/processor.rb +4 -4
- data/examples/resque/sleep_job.rb +3 -3
- data/lib/hornetq.rb +3 -2
- data/lib/hornetq/client.rb +4 -2
- data/lib/hornetq/client/connection.rb +86 -86
- data/lib/hornetq/client/message_handler.rb +1 -1
- data/lib/hornetq/client/org_hornetq_api_core_client_client_session.rb +67 -67
- data/lib/hornetq/client/org_hornetq_core_client_impl_client_consumer_impl.rb +11 -11
- data/lib/hornetq/client/org_hornetq_core_client_impl_client_message_impl.rb +126 -126
- data/lib/hornetq/client/org_hornetq_core_client_impl_client_producer_impl.rb +14 -14
- data/lib/hornetq/client/org_hornetq_utils_typed_properties.rb +6 -6
- data/lib/hornetq/client/requestor_pattern.rb +24 -24
- data/lib/hornetq/client/server_pattern.rb +4 -4
- data/lib/hornetq/client/session_pool.rb +18 -18
- data/lib/hornetq/common/logging.rb +1 -14
- data/lib/hornetq/java/hornetq-bootstrap.jar +0 -0
- data/lib/hornetq/java/hornetq-commons.jar +0 -0
- data/lib/hornetq/java/hornetq-core-client.jar +0 -0
- data/lib/hornetq/java/hornetq-journal.jar +0 -0
- data/lib/hornetq/java/hornetq-server.jar +0 -0
- data/lib/hornetq/java/jnp-client.jar +0 -0
- data/lib/hornetq/java/netty.jar +0 -0
- data/lib/hornetq/server.rb +4 -1
- data/lib/hornetq/version.rb +3 -0
- data/nbproject/private/private.properties +4 -0
- data/nbproject/private/private.xml +4 -0
- data/nbproject/private/rake-d.txt +4 -0
- data/nbproject/project.properties +11 -0
- data/nbproject/project.xml +17 -0
- data/test/client_connection_test.rb +25 -25
- data/test/logging_test.rb +3 -3
- metadata +131 -125
- data/bin/data/bindings/hornetq-bindings-1.bindings +0 -0
- data/bin/data/bindings/hornetq-bindings-2.bindings +0 -0
- data/bin/data/journal/hornetq-data-1.hq +0 -0
- data/bin/data/journal/hornetq-data-2.hq +0 -0
- data/lib/hornetq/common/log_delegate.rb +0 -48
- data/lib/hornetq/common/org_hornetq_core_logging_logger.rb +0 -60
- data/lib/hornetq/java/hornetq-core.jar +0 -0
@@ -1,60 +0,0 @@
|
|
1
|
-
# Extend HornetQ Logger class to respond to standard Rails/Ruby log methods
|
2
|
-
#
|
3
|
-
# The following methods are already implemented by the java class
|
4
|
-
# initialize
|
5
|
-
# delegate
|
6
|
-
#
|
7
|
-
# The following methods are being replaced so that they can support blocks
|
8
|
-
# trace
|
9
|
-
# debug
|
10
|
-
# info
|
11
|
-
# warn
|
12
|
-
# error
|
13
|
-
# fatal
|
14
|
-
#
|
15
|
-
# The following methods are new
|
16
|
-
# trace?
|
17
|
-
# debug?
|
18
|
-
# info?
|
19
|
-
# warn?
|
20
|
-
# error?
|
21
|
-
# fatal?
|
22
|
-
#
|
23
|
-
|
24
|
-
# This has to be a "mix-in" because the class can return instances of itself
|
25
|
-
class org.hornetq.core.logging::Logger
|
26
|
-
# DRY, generate a method for each required log level
|
27
|
-
['debug', 'error', 'fatal', 'info', 'trace', 'warn'].each do |level|
|
28
|
-
eval <<LOG_LEVEL_METHOD
|
29
|
-
def #{level}?
|
30
|
-
#{level}_enabled?
|
31
|
-
end
|
32
|
-
|
33
|
-
alias :java_#{level} :#{level}
|
34
|
-
|
35
|
-
# Support logging with block parameters that only get evaluated if the
|
36
|
-
# matching log level is enabled
|
37
|
-
def #{level}(message=nil, &block)
|
38
|
-
if #{level}?
|
39
|
-
if block
|
40
|
-
java_#{level}(block.call.to_s.to_java_string)
|
41
|
-
else
|
42
|
-
java_#{level}(message.to_s.to_java_string)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
LOG_LEVEL_METHOD
|
47
|
-
end
|
48
|
-
|
49
|
-
private
|
50
|
-
# Implement since not implemented by Logger
|
51
|
-
def error_enabled?
|
52
|
-
true
|
53
|
-
end
|
54
|
-
def fatal_enabled?
|
55
|
-
true
|
56
|
-
end
|
57
|
-
def warn_enabled?
|
58
|
-
true
|
59
|
-
end
|
60
|
-
end
|
Binary file
|