qwirk_jms_adapter 0.2.0-java → 0.2.1-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.md +5 -0
- data/lib/qwirk/adapter/jms/worker.rb +5 -4
- metadata +3 -3
data/History.md
CHANGED
@@ -7,6 +7,7 @@ module Qwirk
|
|
7
7
|
@worker_config = worker_config
|
8
8
|
@name = worker_config.name
|
9
9
|
@marshaler = worker_config.marshaler
|
10
|
+
@marshal_sym = worker_config.marshal_sym
|
10
11
|
@session = worker_config.connection.create_session
|
11
12
|
@consumer = @session.consumer(worker_config.destination)
|
12
13
|
@session.start
|
@@ -24,12 +25,12 @@ module Qwirk
|
|
24
25
|
end
|
25
26
|
|
26
27
|
def send_response(original_message, marshaled_object)
|
27
|
-
do_send_response(@marshaler, original_message, marshaled_object)
|
28
|
+
do_send_response(@marshal_sym, @marshaler, original_message, marshaled_object)
|
28
29
|
end
|
29
30
|
|
30
31
|
def send_exception(original_message, e)
|
31
32
|
@string_marshaler ||= MarshalStrategy.find(:string)
|
32
|
-
do_send_response(@string_marshaler, original_message, "Exception: #{e.message}") do |reply_message|
|
33
|
+
do_send_response(:string, @string_marshaler, original_message, "Exception: #{e.message}") do |reply_message|
|
33
34
|
reply_message['qwirk:exception'] = Qwirk::RemoteException.new(e).marshal
|
34
35
|
end
|
35
36
|
end
|
@@ -62,7 +63,7 @@ module Qwirk
|
|
62
63
|
|
63
64
|
private
|
64
65
|
|
65
|
-
def do_send_response(marshaler, original_message, marshaled_object)
|
66
|
+
def do_send_response(marshal_sym, marshaler, original_message, marshaled_object)
|
66
67
|
return false unless original_message.reply_to
|
67
68
|
begin
|
68
69
|
@session.producer(:destination => original_message.reply_to) do |producer|
|
@@ -78,7 +79,7 @@ module Qwirk
|
|
78
79
|
producer.time_to_live = time_to_live.to_i if time_to_live
|
79
80
|
reply_message = Util.create_message(@session, marshaled_object, marshaler.marshal_type)
|
80
81
|
reply_message.jms_correlation_id = original_message.jms_message_id
|
81
|
-
reply_message['qwirk:marshal'] =
|
82
|
+
reply_message['qwirk:marshal'] = marshal_sym.to_s
|
82
83
|
reply_message['qwirk:worker'] = @name
|
83
84
|
reply_message['QwirkTaskID'] = original_message['QwirkTaskID'] if original_message['QwirkTaskID']
|
84
85
|
yield reply_message if block_given?
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: qwirk_jms_adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.1
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- Brad Pardee
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-02 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jruby-jms
|
@@ -50,7 +50,7 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.2.
|
53
|
+
version: 0.2.1
|
54
54
|
none: false
|
55
55
|
requirement: *4176
|
56
56
|
prerelease: false
|