torquebox-messaging 3.0.0.beta2-java → 3.0.0-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.
@@ -98,10 +98,9 @@ module TorqueBox
98
98
  # @return [Boolean] true if the destination was successfully stopped, false otherwise
99
99
  # @see TorqueBox::Messaging::Destination.stop
100
100
  def stop_sync
101
- latch = stop
102
- TorqueBox::Messaging::Destination.wait_for_latch(latch)
101
+ TorqueBox::Messaging::Destination.wait_for_latch(stop)
103
102
  end
104
-
103
+
105
104
  # Publishes a message to the destination
106
105
  #
107
106
  # @param message The message to publish
@@ -39,8 +39,7 @@ module TorqueBox
39
39
  exported = options.fetch(:exported, false)
40
40
 
41
41
  with_destinationizer do |destinationizer|
42
- latch = destinationizer.create_queue(name, durable, selector, exported)
43
- return nil unless TorqueBox::Messaging::Destination.wait_for_latch(latch)
42
+ destinationizer.create_queue(name, durable, selector, exported)
44
43
  end
45
44
 
46
45
  new(name, options)
@@ -37,8 +37,7 @@ module TorqueBox
37
37
  exported = options.fetch(:exported, false)
38
38
 
39
39
  with_destinationizer do |destinationizer|
40
- latch = destinationizer.create_topic(name, exported)
41
- return nil unless TorqueBox::Messaging::Destination.wait_for_latch(latch)
40
+ destinationizer.create_topic(name, exported)
42
41
  end
43
42
 
44
43
  new(name, options)
Binary file
@@ -1,6 +1,6 @@
1
1
  module TorqueboxMessaging
2
- VERSION = '3.0.0.beta2'
3
- MAVEN_VERSION = '3.0.0.beta2'
2
+ VERSION = '3.0.0'
3
+ MAVEN_VERSION = '3.0.0'
4
4
  end
5
5
  begin
6
6
  require 'java'
@@ -77,38 +77,9 @@ describe TorqueBox::Messaging::Destination do
77
77
  queue.with_session { }
78
78
  end
79
79
 
80
- it "should return nil if the queue start times out" do
81
- latch = mock("StartLatch")
82
- latch.should_receive(:await).with(kind_of(Numeric), java.util.concurrent.TimeUnit::SECONDS).and_raise("boom")
83
-
84
- destinationizer = mock("Destinationizer")
85
- destinationizer.should_receive(:create_queue).with("my_queue", true, "", false).and_return(latch)
86
-
87
- TorqueBox::Messaging::Destination.should_receive(:with_destinationizer).and_yield(destinationizer)
88
-
89
- queue = TorqueBox::Messaging::Queue.start("my_queue")
90
- queue.should be_nil
91
- end
92
-
93
- it "should return nil if the topic start times out" do
94
- latch = mock("StartLatch")
95
- latch.should_receive(:await).with(kind_of(Numeric), java.util.concurrent.TimeUnit::SECONDS).and_raise("boom")
96
-
97
- destinationizer = mock("Destinationizer")
98
- destinationizer.should_receive(:create_topic).with("my_topic", false).and_return(latch)
99
-
100
- TorqueBox::Messaging::Destination.should_receive(:with_destinationizer).and_yield(destinationizer)
101
-
102
- topic = TorqueBox::Messaging::Topic.start( "my_topic" )
103
- topic.should be_nil
104
- end
105
-
106
80
  it "should start and stop a queue" do
107
- latch = mock("StartLatch")
108
- latch.should_receive(:await).with(kind_of(Numeric), java.util.concurrent.TimeUnit::SECONDS)
109
-
110
81
  destinationizer = mock("Destinationizer")
111
- destinationizer.should_receive(:create_queue).with("my_queue", true, "", false).and_return(latch)
82
+ destinationizer.should_receive(:create_queue).with("my_queue", true, "", false).and_return(true)
112
83
  destinationizer.should_receive(:remove_destination).with("my_queue")
113
84
 
114
85
  TorqueBox::Messaging::Destination.should_receive(:with_destinationizer).twice.and_yield(destinationizer)
@@ -120,11 +91,8 @@ describe TorqueBox::Messaging::Destination do
120
91
  end
121
92
 
122
93
  it "should start and stop a topic" do
123
- latch = mock("StartLatch")
124
- latch.should_receive(:await).with(kind_of(Numeric), java.util.concurrent.TimeUnit::SECONDS)
125
-
126
94
  destinationizer = mock("Destinationizer")
127
- destinationizer.should_receive(:create_topic).with("my_topic", false).and_return(latch)
95
+ destinationizer.should_receive(:create_topic).with("my_topic", false).and_return(true)
128
96
  destinationizer.should_receive(:remove_destination).with("my_topic")
129
97
 
130
98
  TorqueBox::Messaging::Destination.should_receive(:with_destinationizer).twice.and_yield(destinationizer)
@@ -135,15 +103,9 @@ describe TorqueBox::Messaging::Destination do
135
103
  end
136
104
 
137
105
  it "should start a queue and stop it in an synchronous way" do
138
- start_latch = mock("StartLatch")
139
- start_latch.should_receive(:await).with(kind_of(Numeric), java.util.concurrent.TimeUnit::SECONDS)
140
-
141
- stop_latch = mock("StopLatch")
142
- stop_latch.should_receive(:await).with(kind_of(Numeric), java.util.concurrent.TimeUnit::SECONDS)
143
-
144
- destinationizer = mock("Destinationizer")
145
- destinationizer.should_receive(:create_queue).with("my_queue", true, "", false).and_return(start_latch)
146
- destinationizer.should_receive(:remove_destination).with("my_queue").and_return(stop_latch)
106
+ destinationizer = mock("Destinationizer")
107
+ destinationizer.should_receive(:create_queue).with("my_queue", true, "", false)
108
+ destinationizer.should_receive(:remove_destination).with("my_queue")
147
109
 
148
110
  TorqueBox::Messaging::Destination.should_receive(:with_destinationizer).twice.and_yield(destinationizer)
149
111
 
@@ -154,15 +116,9 @@ describe TorqueBox::Messaging::Destination do
154
116
  end
155
117
 
156
118
  it "should start a topic and stop it in an synchronous way" do
157
- start_latch = mock("StartLatch")
158
- start_latch.should_receive(:await).with(kind_of(Numeric), java.util.concurrent.TimeUnit::SECONDS)
159
-
160
- stop_latch = mock("StopLatch")
161
- stop_latch.should_receive(:await).with(kind_of(Numeric), java.util.concurrent.TimeUnit::SECONDS)
162
-
163
119
  destinationizer = mock("Destinationizer")
164
- destinationizer.should_receive(:create_topic).with("my_topic", false).and_return(start_latch)
165
- destinationizer.should_receive(:remove_destination).with("my_topic").and_return(stop_latch)
120
+ destinationizer.should_receive(:create_topic).with("my_topic", false)
121
+ destinationizer.should_receive(:remove_destination).with("my_topic")
166
122
 
167
123
  TorqueBox::Messaging::Destination.should_receive(:with_destinationizer).twice.and_yield(destinationizer)
168
124
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torquebox-messaging
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 6
5
- version: 3.0.0.beta2
4
+ prerelease:
5
+ version: 3.0.0
6
6
  platform: java
7
7
  authors:
8
8
  - The TorqueBox Team
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-07 00:00:00.000000000 Z
12
+ date: 2013-08-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: torquebox-core
@@ -17,13 +17,13 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 3.0.0.beta2
20
+ version: 3.0.0
21
21
  none: false
22
22
  requirement: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 3.0.0.beta2
26
+ version: 3.0.0
27
27
  none: false
28
28
  prerelease: false
29
29
  type: :runtime
@@ -33,13 +33,13 @@ dependencies:
33
33
  requirements:
34
34
  - - '='
35
35
  - !ruby/object:Gem::Version
36
- version: 3.0.0.beta2
36
+ version: 3.0.0
37
37
  none: false
38
38
  requirement: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 3.0.0.beta2
42
+ version: 3.0.0
43
43
  none: false
44
44
  prerelease: false
45
45
  type: :runtime
@@ -94,49 +94,49 @@ files:
94
94
  - lib/hornetq-journal-2.3.0.CR1.jar
95
95
  - lib/jboss-logmanager-1.4.0.Final.jar
96
96
  - lib/hornetq-jms-client-2.3.0.CR1.jar
97
- - lib/org.torquebox.messaging-client.rb
98
97
  - lib/gem_hook.rb
98
+ - lib/org.torquebox.messaging-client.rb
99
99
  - lib/torquebox/messaging.rb
100
- - lib/torquebox/messaging/datamapper_marshaling.rb
100
+ - lib/torquebox/messaging/core.rb
101
+ - lib/torquebox/messaging/message_processor.rb
102
+ - lib/torquebox/messaging/connection_factory.rb
101
103
  - lib/torquebox/messaging/xa_connection.rb
102
- - lib/torquebox/messaging/topic.rb
103
- - lib/torquebox/messaging/future_status.rb
104
- - lib/torquebox/messaging/backgroundable_processor.rb
105
- - lib/torquebox/messaging/marshal_base64_message.rb
106
- - lib/torquebox/messaging/const_missing.rb
104
+ - lib/torquebox/messaging/future.rb
107
105
  - lib/torquebox/messaging/marshal_message.rb
108
- - lib/torquebox/messaging/text_message.rb
109
- - lib/torquebox/messaging/xa_session.rb
110
- - lib/torquebox/messaging/task.rb
111
- - lib/torquebox/messaging/connection_factory.rb
112
- - lib/torquebox/messaging/future_responder.rb
113
106
  - lib/torquebox/messaging/xa_connection_factory.rb
114
- - lib/torquebox/messaging/message.rb
107
+ - lib/torquebox/messaging/echo_processor.rb
108
+ - lib/torquebox/messaging/task.rb
109
+ - lib/torquebox/messaging/queue.rb
115
110
  - lib/torquebox/messaging/destination.rb
116
- - lib/torquebox/messaging/edn_message.rb
117
- - lib/torquebox/messaging/message_processor.rb
118
- - lib/torquebox/messaging/future.rb
119
111
  - lib/torquebox/messaging/json_message.rb
112
+ - lib/torquebox/messaging/future_status.rb
113
+ - lib/torquebox/messaging/text_message.rb
120
114
  - lib/torquebox/messaging/backgroundable.rb
121
- - lib/torquebox/messaging/session.rb
122
- - lib/torquebox/messaging/core.rb
115
+ - lib/torquebox/messaging/future_responder.rb
116
+ - lib/torquebox/messaging/marshal_base64_message.rb
117
+ - lib/torquebox/messaging/datamapper_marshaling.rb
118
+ - lib/torquebox/messaging/xa_session.rb
119
+ - lib/torquebox/messaging/message.rb
120
+ - lib/torquebox/messaging/backgroundable_processor.rb
121
+ - lib/torquebox/messaging/edn_message.rb
123
122
  - lib/torquebox/messaging/connection.rb
124
- - lib/torquebox/messaging/echo_processor.rb
125
- - lib/torquebox/messaging/queue.rb
123
+ - lib/torquebox/messaging/topic.rb
124
+ - lib/torquebox/messaging/session.rb
125
+ - lib/torquebox/messaging/const_missing.rb
126
+ - lib/torquebox/messaging/processor_middleware/default_middleware.rb
126
127
  - lib/torquebox/messaging/processor_middleware/with_transaction.rb
127
128
  - lib/torquebox/messaging/processor_middleware/chain.rb
128
- - lib/torquebox/messaging/processor_middleware/default_middleware.rb
129
129
  - lib/torquebox/messaging/ext/javax_jms_queue_browser.rb
130
- - spec/datamapper_marshaling_spec.rb
131
- - spec/future_responder_spec.rb
132
130
  - spec/future_spec.rb
133
- - spec/task_spec.rb
134
131
  - spec/message_spec.rb
132
+ - spec/task_spec.rb
133
+ - spec/default_middleware_spec.rb
134
+ - spec/future_responder_spec.rb
135
135
  - spec/backgroundable_spec.rb
136
+ - spec/datamapper_marshaling_spec.rb
136
137
  - spec/chain_spec.rb
137
- - spec/destination_spec.rb
138
138
  - spec/message_processor_spec.rb
139
- - spec/default_middleware_spec.rb
139
+ - spec/destination_spec.rb
140
140
  homepage: http://torquebox.org/
141
141
  licenses:
142
142
  - Public Domain
@@ -152,9 +152,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
152
152
  none: false
153
153
  required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  requirements:
155
- - - '>'
155
+ - - '>='
156
156
  - !ruby/object:Gem::Version
157
- version: 1.3.1
157
+ version: '0'
158
158
  none: false
159
159
  requirements: []
160
160
  rubyforge_project:
@@ -163,13 +163,13 @@ signing_key:
163
163
  specification_version: 3
164
164
  summary: TorqueBox Messaging Client
165
165
  test_files:
166
- - spec/datamapper_marshaling_spec.rb
167
- - spec/future_responder_spec.rb
168
166
  - spec/future_spec.rb
169
- - spec/task_spec.rb
170
167
  - spec/message_spec.rb
168
+ - spec/task_spec.rb
169
+ - spec/default_middleware_spec.rb
170
+ - spec/future_responder_spec.rb
171
171
  - spec/backgroundable_spec.rb
172
+ - spec/datamapper_marshaling_spec.rb
172
173
  - spec/chain_spec.rb
173
- - spec/destination_spec.rb
174
174
  - spec/message_processor_spec.rb
175
- - spec/default_middleware_spec.rb
175
+ - spec/destination_spec.rb