Module: ModernTimes::JMS
- Defined in:
- lib/modern_times/jms.rb,
lib/modern_times/jms/worker.rb,
lib/modern_times/jms/publisher.rb,
lib/modern_times/jms/connection.rb,
lib/modern_times/jms/supervisor.rb,
lib/modern_times/jms/publish_handle.rb,
lib/modern_times/jms/request_worker.rb,
lib/modern_times/jms/supervisor_mbean.rb
Defined Under Namespace
Modules: Connection, RequestWorker, Worker
Classes: PublishHandle, Publisher, Supervisor, SupervisorMBean
Class Method Summary
collapse
Class Method Details
.create_message(session, marshaler, object) ⇒ Object
25
26
27
28
29
30
31
32
33
34
35
|
# File 'lib/modern_times/jms.rb', line 25
def self.create_message(session, marshaler, object)
case marshaler.marshal_type
when :text
session.create_text_message(marshaler.marshal(object))
when :bytes
msg = session.create_bytes_message()
msg.data = marshaler.marshal(object)
msg
else raise "Invalid marshal type: #{marshaler.marshal_type}"
end
end
|
.same_destination?(options1, options2) ⇒ Boolean
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/modern_times/jms.rb', line 11
def self.same_destination?(options1, options2)
if options1[:queue_name]
return options1[:queue_name] == options2[:queue_name]
elsif options1[:topic_name]
return options1[:topic_name] == options2[:topic_name]
elsif options1[:virtual_topic_name]
return options1[:virtual_topic_name] == options2[:virtual_topic_name]
elsif options1[:destination]
return options1[:destination] == options2[:destination]
else
return false
end
end
|