torquebox-messaging 2.0.0-java → 2.0.1-java
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/torquebox-messaging.jar +0 -0
- data/lib/torquebox-messaging.rb +2 -2
- data/lib/torquebox/messaging/destination.rb +9 -2
- data/spec/destination_spec.rb +12 -0
- metadata +34 -34
data/lib/torquebox-messaging.jar
CHANGED
Binary file
|
data/lib/torquebox-messaging.rb
CHANGED
@@ -49,8 +49,15 @@ module TorqueBox
|
|
49
49
|
|
50
50
|
def initialize(destination, connection_factory_or_options = nil)
|
51
51
|
if connection_factory_or_options.nil? || connection_factory_or_options.is_a?( Hash )
|
52
|
-
|
53
|
-
|
52
|
+
options = connection_factory_or_options
|
53
|
+
connection_factory = __inject__( 'connection-factory' )
|
54
|
+
unless options.nil?
|
55
|
+
# Don't use our internal connection factory if the user
|
56
|
+
# has specified a host or port to connect to
|
57
|
+
connection_factory = nil if options[:host] or options[:port]
|
58
|
+
end
|
59
|
+
@connection_factory = ConnectionFactory.new( connection_factory )
|
60
|
+
@connect_options = options || {}
|
54
61
|
else
|
55
62
|
@connection_factory = ConnectionFactory.new( connection_factory_or_options )
|
56
63
|
@connect_options = {}
|
data/spec/destination_spec.rb
CHANGED
@@ -55,6 +55,18 @@ describe TorqueBox::Messaging::Destination do
|
|
55
55
|
queue.with_session { }
|
56
56
|
end
|
57
57
|
|
58
|
+
it "should connect with host and port if given even when inside container" do
|
59
|
+
internal_factory = Object.new
|
60
|
+
TorqueBox::Registry.merge!("connection-factory" => internal_factory)
|
61
|
+
factory = mock("factory")
|
62
|
+
connection = mock("connection").as_null_object
|
63
|
+
factory.stub(:create_connection).and_return(connection)
|
64
|
+
|
65
|
+
queue = TorqueBox::Messaging::Queue.new("/queues/foo", :host => "bar", :port => 123)
|
66
|
+
queue.connection_factory.should_receive(:create_connection_factory).with("bar", 123).and_return(factory)
|
67
|
+
queue.with_session { }
|
68
|
+
end
|
69
|
+
|
58
70
|
it "should connect with username and password if given" do
|
59
71
|
factory = mock("factory")
|
60
72
|
connection = mock("connection").as_null_object
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: torquebox-messaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.0.
|
5
|
+
version: 2.0.1
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- The TorqueBox Team
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-04-16 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: torquebox-core
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - "="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 2.0.
|
23
|
+
version: 2.0.1
|
24
24
|
type: :runtime
|
25
25
|
version_requirements: *id001
|
26
26
|
- !ruby/object:Gem::Dependency
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 2.0.
|
34
|
+
version: 2.0.1
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id002
|
37
37
|
- !ruby/object:Gem::Dependency
|
@@ -85,45 +85,45 @@ files:
|
|
85
85
|
- lib/hornetq-core-2.2.13.Final.jar
|
86
86
|
- lib/hornetq-jms-2.2.13.Final.jar
|
87
87
|
- lib/netty-3.2.6.Final.jar
|
88
|
-
- lib/org.torquebox.messaging-client.rb
|
89
88
|
- lib/gem_hook.rb
|
89
|
+
- lib/org.torquebox.messaging-client.rb
|
90
90
|
- lib/torquebox/messaging.rb
|
91
|
+
- lib/torquebox/messaging/connection.rb
|
92
|
+
- lib/torquebox/messaging/topic.rb
|
93
|
+
- lib/torquebox/messaging/clojure_message.rb
|
94
|
+
- lib/torquebox/messaging/message.rb
|
95
|
+
- lib/torquebox/messaging/session.rb
|
91
96
|
- lib/torquebox/messaging/core.rb
|
92
|
-
- lib/torquebox/messaging/marshal_message.rb
|
93
|
-
- lib/torquebox/messaging/future_status.rb
|
94
97
|
- lib/torquebox/messaging/text_message.rb
|
95
|
-
- lib/torquebox/messaging/
|
96
|
-
- lib/torquebox/messaging/task.rb
|
97
|
-
- lib/torquebox/messaging/xa_connection_factory.rb
|
98
|
-
- lib/torquebox/messaging/queue.rb
|
99
|
-
- lib/torquebox/messaging/clojure_message.rb
|
98
|
+
- lib/torquebox/messaging/json_message.rb
|
100
99
|
- lib/torquebox/messaging/backgroundable_processor.rb
|
100
|
+
- lib/torquebox/messaging/xa_connection.rb
|
101
|
+
- lib/torquebox/messaging/xa_connection_factory.rb
|
101
102
|
- lib/torquebox/messaging/xa_session.rb
|
102
|
-
- lib/torquebox/messaging/connection.rb
|
103
|
-
- lib/torquebox/messaging/future.rb
|
104
|
-
- lib/torquebox/messaging/message.rb
|
105
|
-
- lib/torquebox/messaging/topic.rb
|
106
103
|
- lib/torquebox/messaging/const_missing.rb
|
107
|
-
- lib/torquebox/messaging/
|
108
|
-
- lib/torquebox/messaging/
|
109
|
-
- lib/torquebox/messaging/
|
104
|
+
- lib/torquebox/messaging/queue.rb
|
105
|
+
- lib/torquebox/messaging/destination.rb
|
106
|
+
- lib/torquebox/messaging/marshal_base64_message.rb
|
110
107
|
- lib/torquebox/messaging/processor_wrapper.rb
|
111
|
-
- lib/torquebox/messaging/
|
112
|
-
- lib/torquebox/messaging/
|
113
|
-
- lib/torquebox/messaging/
|
114
|
-
- lib/torquebox/messaging/
|
108
|
+
- lib/torquebox/messaging/marshal_message.rb
|
109
|
+
- lib/torquebox/messaging/future.rb
|
110
|
+
- lib/torquebox/messaging/task.rb
|
111
|
+
- lib/torquebox/messaging/future_status.rb
|
115
112
|
- lib/torquebox/messaging/datamapper_marshaling.rb
|
116
|
-
- lib/torquebox/messaging/
|
113
|
+
- lib/torquebox/messaging/message_processor.rb
|
114
|
+
- lib/torquebox/messaging/backgroundable.rb
|
115
|
+
- lib/torquebox/messaging/connection_factory.rb
|
116
|
+
- lib/torquebox/messaging/future_responder.rb
|
117
117
|
- lib/torquebox/messaging/ext/javax_jms_queue_browser.rb
|
118
|
-
- spec/
|
119
|
-
- spec/
|
120
|
-
- spec/task_spec.rb
|
118
|
+
- spec/message_spec.rb
|
119
|
+
- spec/json_message_spec.rb
|
121
120
|
- spec/future_spec.rb
|
121
|
+
- spec/task_spec.rb
|
122
122
|
- spec/datamapper_marshaling_spec.rb
|
123
|
-
- spec/
|
123
|
+
- spec/backgroundable_spec.rb
|
124
124
|
- spec/message_processor_spec.rb
|
125
|
-
- spec/json_message_spec.rb
|
126
125
|
- spec/destination_spec.rb
|
126
|
+
- spec/future_responder_spec.rb
|
127
127
|
homepage: http://torquebox.org/
|
128
128
|
licenses:
|
129
129
|
- lgpl
|
@@ -152,12 +152,12 @@ signing_key:
|
|
152
152
|
specification_version: 3
|
153
153
|
summary: TorqueBox Messaging Client
|
154
154
|
test_files:
|
155
|
-
- spec/
|
156
|
-
- spec/
|
157
|
-
- spec/task_spec.rb
|
155
|
+
- spec/message_spec.rb
|
156
|
+
- spec/json_message_spec.rb
|
158
157
|
- spec/future_spec.rb
|
158
|
+
- spec/task_spec.rb
|
159
159
|
- spec/datamapper_marshaling_spec.rb
|
160
|
-
- spec/
|
160
|
+
- spec/backgroundable_spec.rb
|
161
161
|
- spec/message_processor_spec.rb
|
162
|
-
- spec/json_message_spec.rb
|
163
162
|
- spec/destination_spec.rb
|
163
|
+
- spec/future_responder_spec.rb
|