org.torquebox.torquebox-messaging-container 1.0.0.Beta22-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/spec/foo ADDED
@@ -0,0 +1,62 @@
1
+
2
+ require 'torquebox/container/messaging'
3
+
4
+ describe TorqueBox::Container::Messaging do
5
+
6
+ =begin
7
+ it "should be instantiable" do
8
+ container = TorqueBox::Container::Messaging.new
9
+ end
10
+
11
+ it "should be startable" do
12
+ container = TorqueBox::Container::Messaging.new
13
+ container.start
14
+ puts "started container #{container}"
15
+ sleep(2)
16
+ puts "stopping container #{container}"
17
+ container.stop
18
+ end
19
+
20
+
21
+ it "should set up an RMI class provider" do
22
+ container = TorqueBox::Container::Messaging.new
23
+ container.start
24
+ provider = container['RMIClassProvider']
25
+ provider.should_not be_nil
26
+ puts provider.inspect
27
+ container.stop
28
+ end
29
+
30
+ it "should be able to deploy a queues.yml" do
31
+ container = TorqueBox::Container::Messaging.new
32
+ container.start
33
+ queues_yml = container.deploy( File.join( File.dirname(__FILE__), 'queues.yml' ) )
34
+ container.process_deployments( true )
35
+ container.undeploy( queues_yml )
36
+ container.stop
37
+ end
38
+
39
+ it "should deploy a JMSServerManager" do
40
+ container = TorqueBox::Container::Messaging.new
41
+ container.start
42
+ jms_server_manager = container['JMSServerManager']
43
+ jms_server_manager.should_not be_nil
44
+ container.stop
45
+ end
46
+ =end
47
+
48
+ it "should be able to deploy a messaging.rb" do
49
+ container = TorqueBox::Container::Messaging.new
50
+ container.start
51
+ puts "started container #{container}"
52
+ #queues_yml = container.deploy( File.join( File.dirname(__FILE__), 'queues.yml' ) )
53
+ messaging_rb = container.deploy( File.join( File.dirname(__FILE__), 'messaging.rb' ) )
54
+ container.process_deployments( true )
55
+ puts "stopping container #{container}"
56
+ container.undeploy( messaging_rb )
57
+ #container.undeploy( queues_yml )
58
+ container.stop
59
+ end
60
+ =begin
61
+ =end
62
+ end
@@ -0,0 +1,74 @@
1
+
2
+ require 'org.torquebox.torquebox-naming-container'
3
+ require 'org.torquebox.torquebox-naming-client'
4
+
5
+ require 'torquebox/messaging/message_broker'
6
+
7
+ describe TorqueBox::Messaging::MessageBroker do
8
+
9
+ describe "basics" do
10
+
11
+ before(:each) do
12
+ @container = TorqueBox::Container::Foundation.new
13
+ @container.enable( TorqueBox::Naming::NamingService ) {|config| config.export=false}
14
+ @container.enable( TorqueBox::Messaging::MessageBroker ) {|config| config.data_dir = "#{Dir.pwd}/target"}
15
+ begin
16
+ @container.start
17
+ rescue => e
18
+ puts e
19
+ puts e.backtrace
20
+ raise e
21
+ end
22
+ end
23
+
24
+ after(:each) do
25
+ @container.stop
26
+ end
27
+
28
+ it "should have an RMIClassProvider" do
29
+ @container['RMIClassProvider'].should_not be_nil
30
+ end
31
+
32
+ it "should have a QueuesYamlParsingDeployer" do
33
+ @container['QueuesYamlParsingDeployer'].should_not be_nil
34
+ end
35
+ end
36
+
37
+ describe "deployments" do
38
+ before(:each) do
39
+ #TorqueBox::Naming.configure_local
40
+ @container = TorqueBox::Container::Foundation.new
41
+ @container.enable( TorqueBox::Naming::NamingService ) {|config| config.export=false}
42
+ @container.enable( TorqueBox::Messaging::MessageBroker ) {|config| config.data_dir = "#{Dir.pwd}/target"}
43
+ begin
44
+ @container.start
45
+ rescue => e
46
+ puts e
47
+ puts e.backtrace
48
+ raise e
49
+ end
50
+ @deployments = []
51
+ end
52
+
53
+ after(:each) do
54
+ @deployments.reverse.each do |deployment|
55
+ @container.undeploy( deployment )
56
+ end
57
+ @container.stop
58
+ end
59
+
60
+ it "should be able to deploy a queues.yml" do
61
+ @deployments << @container.deploy( File.join( File.dirname(__FILE__), 'queues.yml' ) )
62
+ @container.process_deployments(true)
63
+ end
64
+
65
+ it "should be able to deploy a messaging.rb" do
66
+ @deployments << @container.deploy( File.join( File.dirname(__FILE__), 'queues.yml' ) )
67
+ @container.process_deployments(true)
68
+ @deployments << @container.deploy( File.join( File.dirname(__FILE__), 'messaging.rb' ) )
69
+ @container.process_deployments(true)
70
+ end
71
+
72
+ end
73
+
74
+ end
@@ -0,0 +1,29 @@
1
+
2
+ require 'torquebox/messaging/message_processor_host'
3
+
4
+ describe TorqueBox::Messaging::MessageProcessorHost do
5
+
6
+ describe "basics" do
7
+ before(:each) do
8
+ @container = TorqueBox::Container::Foundation.new
9
+ @container.enable( TorqueBox::Messaging::MessageProcessorHost )
10
+ begin
11
+ @container.start
12
+ rescue => e
13
+ puts e
14
+ puts e.backtrace
15
+ raise e
16
+ end
17
+ end
18
+
19
+ after(:each) do
20
+ @container.stop
21
+ end
22
+
23
+ it "should have a MessageProcessorDeployer" do
24
+ @container['MessageProcessorDeployer'].should_not be_nil
25
+ end
26
+
27
+ end
28
+
29
+ end
data/spec/messaging.rb ADDED
@@ -0,0 +1,11 @@
1
+
2
+ FUCK FUCK FUCK{
3
+ class MyConsumer
4
+ def process!(msg)
5
+ puts "processing #{msg.inspect}"
6
+ end
7
+ end
8
+
9
+ TorqueBox::Messaging::Gateway.define do |gateway|
10
+ gateway.subscribe MyConsumer, '/queues/foo'
11
+ end
data/spec/messaging.tq ADDED
@@ -0,0 +1,5 @@
1
+
2
+ /queues/foo:
3
+ MyConsumer:
4
+ config:
5
+ nothing: here
@@ -0,0 +1,6 @@
1
+
2
+ class MyConsumer
3
+ def process!(msg)
4
+ puts "processing #{msg.text}"
5
+ end
6
+ end
data/spec/queues.yml ADDED
@@ -0,0 +1 @@
1
+ /queues/foo:
metadata ADDED
@@ -0,0 +1,169 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: org.torquebox.torquebox-messaging-container
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: true
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 0
9
+ - Beta22
10
+ version: 1.0.0.Beta22
11
+ platform: java
12
+ authors: []
13
+
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-09-30 00:00:00 -05:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: org.torquebox.torquebox-container-foundation
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - "="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 1
30
+ - 0
31
+ - 0
32
+ - Beta22
33
+ version: 1.0.0.Beta22
34
+ type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: org.torquebox.vfs
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "="
42
+ - !ruby/object:Gem::Version
43
+ segments:
44
+ - 1
45
+ - 0
46
+ - 0
47
+ - Beta22
48
+ version: 1.0.0.Beta22
49
+ type: :development
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
52
+ name: org.torquebox.torquebox-naming-container
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - "="
57
+ - !ruby/object:Gem::Version
58
+ segments:
59
+ - 1
60
+ - 0
61
+ - 0
62
+ - Beta22
63
+ version: 1.0.0.Beta22
64
+ type: :development
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ name: org.torquebox.torquebox-naming-client
68
+ prerelease: false
69
+ requirement: &id004 !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "="
72
+ - !ruby/object:Gem::Version
73
+ segments:
74
+ - 1
75
+ - 0
76
+ - 0
77
+ - Beta22
78
+ version: 1.0.0.Beta22
79
+ type: :runtime
80
+ version_requirements: *id004
81
+ - !ruby/object:Gem::Dependency
82
+ name: rspec
83
+ prerelease: false
84
+ requirement: &id005 !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "="
87
+ - !ruby/object:Gem::Version
88
+ segments:
89
+ - 1
90
+ - 3
91
+ - 0
92
+ version: 1.3.0
93
+ type: :development
94
+ version_requirements: *id005
95
+ description: ""
96
+ email:
97
+ executables:
98
+ - trq-message-broker
99
+ - trq-message-processor-host
100
+ extensions: []
101
+
102
+ extra_rdoc_files: []
103
+
104
+ files:
105
+ - licenses/lgpl-2.1.txt
106
+ - lib/torquebox-messaging-container.jar
107
+ - lib/org.torquebox.torquebox-messaging-container.rb
108
+ - lib/jboss-common-core-2.2.17.GA.jar
109
+ - lib/jnp-client-5.0.5.Final.jar
110
+ - lib/torquebox-messaging-int.jar
111
+ - lib/torquebox-messaging-core.jar
112
+ - lib/torquebox-messaging-metadata.jar
113
+ - lib/jboss-jms-api_1.1_spec-1.0.0.Beta1.jar
114
+ - lib/hornetq-core-2.1.2.Final.jar
115
+ - lib/hornetq-jms-2.1.2.Final.jar
116
+ - lib/hornetq-logging-2.1.2.Final.jar
117
+ - lib/netty-3.2.1.Final.jar
118
+ - bin/trq-message-broker
119
+ - bin/trq-message-processor-host
120
+ - lib/gem_hook.rb
121
+ - lib/torquebox/messaging/hornetq-configuration.xml
122
+ - lib/torquebox/messaging/message-broker-jboss-beans.xml
123
+ - lib/torquebox/messaging/message-processor-host-jboss-beans.xml
124
+ - lib/torquebox/messaging/message_broker.rb
125
+ - lib/torquebox/messaging/message_processor_host.rb
126
+ - lib/torquebox/messaging/commands/message_broker.rb
127
+ - lib/torquebox/messaging/commands/message_processor_host.rb
128
+ - spec/foo
129
+ - spec/message_broker_spec.rb
130
+ - spec/message_processor_host_spec.rb
131
+ - spec/messaging.rb
132
+ - spec/messaging.tq
133
+ - spec/my_consumer.rb
134
+ - spec/queues.yml
135
+ has_rdoc: true
136
+ homepage: http://www.torquebox.org/torquebox-container-parent/torquebox-messaging-container/
137
+ licenses:
138
+ - lgpl
139
+ post_install_message:
140
+ rdoc_options: []
141
+
142
+ require_paths:
143
+ - lib
144
+ required_ruby_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ segments:
149
+ - 0
150
+ version: "0"
151
+ required_rubygems_version: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - ">"
154
+ - !ruby/object:Gem::Version
155
+ segments:
156
+ - 1
157
+ - 3
158
+ - 1
159
+ version: 1.3.1
160
+ requirements: []
161
+
162
+ rubyforge_project:
163
+ rubygems_version: 1.3.6
164
+ signing_key:
165
+ specification_version: 3
166
+ summary: TorqueBox Message Broker
167
+ test_files:
168
+ - spec/message_broker_spec.rb
169
+ - spec/message_processor_host_spec.rb