torquebox-messaging-container 1.0.0.CR1-java
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/trq-message-broker +27 -0
- data/bin/trq-message-processor-host +27 -0
- data/lib/gem_hook.rb +20 -0
- data/lib/hornetq-core-2.1.2.Final.jar +0 -0
- data/lib/hornetq-jms-2.1.2.Final.jar +0 -0
- data/lib/hornetq-logging-2.1.2.Final.jar +0 -0
- data/lib/jboss-common-core-2.2.17.GA.jar +0 -0
- data/lib/jboss-jms-api_1.1_spec-1.0.0.Final.jar +0 -0
- data/lib/jnp-client-5.0.5.Final.jar +0 -0
- data/lib/netty-3.2.1.Final.jar +0 -0
- data/lib/org.torquebox.messaging-container.rb +20 -0
- data/lib/torquebox/messaging/commands/message_broker.rb +92 -0
- data/lib/torquebox/messaging/commands/message_processor_host.rb +87 -0
- data/lib/torquebox/messaging/dispatcher.rb +87 -0
- data/lib/torquebox/messaging/hornetq-configuration.xml +120 -0
- data/lib/torquebox/messaging/message-broker-jboss-beans.xml +112 -0
- data/lib/torquebox/messaging/message-processor-host-jboss-beans.xml +11 -0
- data/lib/torquebox/messaging/message_broker.rb +52 -0
- data/lib/torquebox/messaging/message_processor_host.rb +48 -0
- data/lib/torquebox-messaging-container.jar +0 -0
- data/lib/torquebox-messaging-container.rb +23 -0
- data/lib/torquebox-messaging-core.jar +0 -0
- data/lib/torquebox-messaging-int.jar +0 -0
- data/lib/torquebox-messaging-metadata.jar +0 -0
- data/licenses/lgpl-2.1.txt +504 -0
- data/spec/dispatcher_spec.rb +79 -0
- data/spec/message_broker_spec.rb +72 -0
- data/spec/message_processor_host_spec.rb +29 -0
- data/spec/messaging.yml +21 -0
- data/spec/queues.yml +2 -0
- metadata +142 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
|
3
|
+
dev_lib_dir = File.dirname(__FILE__) + '/../target/org.torquebox.torquebox-naming-container/lib/'
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
|
7
|
+
# Require torquebox-vfs but unset the VFS protocol handlers because
|
8
|
+
# VFSUtils.toURI(url) has bugs when used outside of AS on Windows
|
9
|
+
require 'torquebox-vfs'
|
10
|
+
java.lang.System.setProperty('java.protocol.handler.pkgs', 'java.net')
|
11
|
+
|
12
|
+
if ( File.exist?( dev_lib_dir ) )
|
13
|
+
$:.unshift File.join( File.dirname(__FILE__), '..', 'lib' )
|
14
|
+
Dir[ "#{dev_lib_dir}/*.jar" ].each do |jar|
|
15
|
+
require jar
|
16
|
+
end
|
17
|
+
else
|
18
|
+
require 'torquebox-messaging-container'
|
19
|
+
end
|
20
|
+
|
21
|
+
require 'torquebox-naming-container'
|
22
|
+
require 'torquebox/messaging/commands/message_broker'
|
23
|
+
|
24
|
+
command = TorqueBox::Messaging::Commands::MessageBroker.new
|
25
|
+
command.parse!( ARGV )
|
26
|
+
|
27
|
+
command.run()
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
|
3
|
+
dev_lib_dir = File.dirname(__FILE__) + '/../target/torquebox-messaging-container/lib/'
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
|
7
|
+
# Require torquebox-vfs but unset the VFS protocol handlers because
|
8
|
+
# VFSUtils.toURI(url) has bugs when used outside of AS on Windows
|
9
|
+
require 'torquebox-vfs'
|
10
|
+
java.lang.System.setProperty('java.protocol.handler.pkgs', 'java.net')
|
11
|
+
|
12
|
+
if ( File.exist?( dev_lib_dir ) )
|
13
|
+
$:.unshift File.join( File.dirname(__FILE__), '..', 'lib' )
|
14
|
+
Dir[ "#{dev_lib_dir}/*.jar" ].each do |jar|
|
15
|
+
require jar
|
16
|
+
end
|
17
|
+
else
|
18
|
+
require 'torquebox-messaging-container'
|
19
|
+
end
|
20
|
+
|
21
|
+
require 'torquebox-container-foundation'
|
22
|
+
require 'torquebox/messaging/commands/message_processor_host'
|
23
|
+
|
24
|
+
command = TorqueBox::Messaging::Commands::MessageProcessorHost.new
|
25
|
+
command.parse!( ARGV )
|
26
|
+
|
27
|
+
command.run()
|
data/lib/gem_hook.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Copyright 2008-2011 Red Hat, Inc, and individual contributors.
|
2
|
+
#
|
3
|
+
# This is free software; you can redistribute it and/or modify it
|
4
|
+
# under the terms of the GNU Lesser General Public License as
|
5
|
+
# published by the Free Software Foundation; either version 2.1 of
|
6
|
+
# the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This software is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this software; if not, write to the Free
|
15
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
16
|
+
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
17
|
+
|
18
|
+
require 'torquebox/messaging/message_broker'
|
19
|
+
require 'torquebox/messaging/dispatcher'
|
20
|
+
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Copyright 2008-2011 Red Hat, Inc, and individual contributors.
|
2
|
+
#
|
3
|
+
# This is free software; you can redistribute it and/or modify it
|
4
|
+
# under the terms of the GNU Lesser General Public License as
|
5
|
+
# published by the Free Software Foundation; either version 2.1 of
|
6
|
+
# the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This software is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this software; if not, write to the Free
|
15
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
16
|
+
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
17
|
+
|
18
|
+
# Backwards-compatibility
|
19
|
+
$stderr.puts "Usage of 'org.torquebox.messaging-container' is deprecated. Please use 'torquebox-messaging-container'."
|
20
|
+
require 'torquebox-messaging-container'
|
@@ -0,0 +1,92 @@
|
|
1
|
+
# Copyright 2008-2011 Red Hat, Inc, and individual contributors.
|
2
|
+
#
|
3
|
+
# This is free software; you can redistribute it and/or modify it
|
4
|
+
# under the terms of the GNU Lesser General Public License as
|
5
|
+
# published by the Free Software Foundation; either version 2.1 of
|
6
|
+
# the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This software is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this software; if not, write to the Free
|
15
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
16
|
+
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
17
|
+
|
18
|
+
require 'optparse'
|
19
|
+
|
20
|
+
require 'torquebox/container/foundation'
|
21
|
+
require 'torquebox/container/foundation_command'
|
22
|
+
require 'torquebox/messaging/message_broker'
|
23
|
+
require 'torquebox/naming'
|
24
|
+
require 'torquebox/naming/naming_service'
|
25
|
+
|
26
|
+
module TorqueBox
|
27
|
+
module Messaging
|
28
|
+
module Commands
|
29
|
+
|
30
|
+
class MessageBroker < TorqueBox::Container::FoundationCommand
|
31
|
+
|
32
|
+
attr_accessor :deploy_files
|
33
|
+
def initialize()
|
34
|
+
super
|
35
|
+
@deploy_files = []
|
36
|
+
@deployments = []
|
37
|
+
@naming_service = nil
|
38
|
+
@standalone = false
|
39
|
+
@bind_address = nil
|
40
|
+
end
|
41
|
+
|
42
|
+
def configure(container)
|
43
|
+
if ( @standalone )
|
44
|
+
container.enable( TorqueBox::Naming::NamingService )
|
45
|
+
else
|
46
|
+
TorqueBox::Naming.configure do |config|
|
47
|
+
config.host = @naming_service
|
48
|
+
end
|
49
|
+
end
|
50
|
+
container.enable( TorqueBox::Messaging::MessageBroker )
|
51
|
+
end
|
52
|
+
|
53
|
+
def after_start(container)
|
54
|
+
require 'torquebox-vfs'
|
55
|
+
@deploy_files.each do |file|
|
56
|
+
deployment = container.deploy( file )
|
57
|
+
unit = container.deployment_unit( deployment.name )
|
58
|
+
virtual_file = org.jboss.vfs::VFS.child( File.join( Dir.pwd, file ) )
|
59
|
+
unit.addAttachment( 'queues.yml.altDD', virtual_file )
|
60
|
+
container.process_deployments(true)
|
61
|
+
puts "deployed #{file}"
|
62
|
+
@deployments << deployment
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def before_stop(container)
|
67
|
+
@deployments.reverse.each do |deployment|
|
68
|
+
container.undeploy( deployment.name )
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
def parser_options(opts)
|
73
|
+
opts.on( '-d', '--deploy FILE', 'Deploy a destination descriptor' ) do |file|
|
74
|
+
@deploy_files << file
|
75
|
+
end
|
76
|
+
opts.on( '-n', '--naming HOST', 'External naming service connection' ) do |naming_service|
|
77
|
+
@naming_service = naming_service
|
78
|
+
end
|
79
|
+
opts.on( '-s', '--standalone', 'Run standalone (include naming)' ) do |host|
|
80
|
+
@standalone = true
|
81
|
+
end
|
82
|
+
opts.on( '-b', '--bind', 'Bind address' ) do |bind_address|
|
83
|
+
@bind_address = bind_address
|
84
|
+
end
|
85
|
+
super( opts )
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# Copyright 2008-2011 Red Hat, Inc, and individual contributors.
|
2
|
+
#
|
3
|
+
# This is free software; you can redistribute it and/or modify it
|
4
|
+
# under the terms of the GNU Lesser General Public License as
|
5
|
+
# published by the Free Software Foundation; either version 2.1 of
|
6
|
+
# the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This software is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this software; if not, write to the Free
|
15
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
16
|
+
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
17
|
+
|
18
|
+
require 'optparse'
|
19
|
+
|
20
|
+
require 'torquebox/container/foundation'
|
21
|
+
require 'torquebox/container/foundation_command'
|
22
|
+
require 'torquebox/messaging/message_processor_host'
|
23
|
+
require 'torquebox/messaging/metadata_builder'
|
24
|
+
require 'torquebox/naming'
|
25
|
+
|
26
|
+
module TorqueBox
|
27
|
+
module Messaging
|
28
|
+
module Commands
|
29
|
+
|
30
|
+
class MessageProcessorHost < TorqueBox::Container::FoundationCommand
|
31
|
+
|
32
|
+
attr_accessor :deploy_files
|
33
|
+
def initialize()
|
34
|
+
super
|
35
|
+
@deploy_files = []
|
36
|
+
@deployments = []
|
37
|
+
@naming_service = nil
|
38
|
+
end
|
39
|
+
|
40
|
+
def configure(container)
|
41
|
+
TorqueBox::Naming.configure do |config|
|
42
|
+
config.host = @naming_service
|
43
|
+
end
|
44
|
+
container.enable( TorqueBox::Messaging::MessageProcessorHost )
|
45
|
+
end
|
46
|
+
|
47
|
+
def after_start(container)
|
48
|
+
@deploy_files.each do |file|
|
49
|
+
deployment = container.deploy( file )
|
50
|
+
unit = container.deployment_unit( deployment.name )
|
51
|
+
builder = TorqueBox::Messaging::MetaData::Builder.new()
|
52
|
+
builder.evaluate_file( file )
|
53
|
+
builder.processors.each do |processor|
|
54
|
+
org.torquebox.mc::AttachmentUtils.multipleAttach( unit, processor, processor.name )
|
55
|
+
end
|
56
|
+
app_meta = org.torquebox.base.metadata::RubyApplicationMetaData.new
|
57
|
+
app_meta.setApplicationName( "none" )
|
58
|
+
app_meta.setEnvironmentName( ENV['TORQUEBOX_ENV'] || 'development' )
|
59
|
+
app_meta.setRoot( org.jboss.vfs::VFS.getChild( Dir.pwd ) )
|
60
|
+
unit.addAttachment( org.torquebox.base.metadata::RubyApplicationMetaData.java_class, app_meta )
|
61
|
+
container.process_deployments(true)
|
62
|
+
puts "deployed #{file}"
|
63
|
+
@deployments << deployment
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def before_stop(container)
|
68
|
+
@deployments.reverse.each do |deployment|
|
69
|
+
container.undeploy( deployment )
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def parser_options(opts)
|
74
|
+
opts.on( '-d', '--deploy FILE', 'Deploy a message-processor configuration' ) do |file|
|
75
|
+
@deploy_files << file
|
76
|
+
end
|
77
|
+
opts.on( '-n', '--naming HOST', 'External naming service connection' ) do |naming_service|
|
78
|
+
@naming_service = naming_service
|
79
|
+
end
|
80
|
+
super( opts )
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# Copyright 2008-2011 Red Hat, Inc, and individual contributors.
|
2
|
+
#
|
3
|
+
# This is free software; you can redistribute it and/or modify it
|
4
|
+
# under the terms of the GNU Lesser General Public License as
|
5
|
+
# published by the Free Software Foundation; either version 2.1 of
|
6
|
+
# the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This software is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this software; if not, write to the Free
|
15
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
16
|
+
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
|
17
|
+
|
18
|
+
require 'torquebox-container-foundation'
|
19
|
+
require 'torquebox/container/foundation'
|
20
|
+
require 'torquebox/messaging/message_processor_host'
|
21
|
+
require 'torquebox/naming'
|
22
|
+
|
23
|
+
module TorqueBox
|
24
|
+
module Messaging
|
25
|
+
|
26
|
+
# A service that may be configured with mappings of message
|
27
|
+
# consumers to destinations
|
28
|
+
class Dispatcher
|
29
|
+
|
30
|
+
def initialize(options = {}, &block)
|
31
|
+
@options = options
|
32
|
+
instance_eval &block if block_given?
|
33
|
+
end
|
34
|
+
|
35
|
+
# Option keys are :filter and :config, either as symbol or string
|
36
|
+
def map consumer, destination, options = {}
|
37
|
+
options = options.inject({}) {|h,(k,v)| h[k.to_s]=v; h} # jruby won't convert symbols to strings
|
38
|
+
processor = org.torquebox.messaging.deployers::MessagingYamlParsingDeployer::Parser.subscribe(consumer.to_s, destination.to_s, options)
|
39
|
+
processor.ruby_require_path = nil if consumer.is_a? Class
|
40
|
+
processors << processor
|
41
|
+
end
|
42
|
+
|
43
|
+
def start
|
44
|
+
container.start
|
45
|
+
@deployment = container.deploy( object_id.to_s )
|
46
|
+
unit = container.deployment_unit( @deployment.name )
|
47
|
+
processors.each do |processor|
|
48
|
+
org.torquebox.mc::AttachmentUtils.multipleAttach( unit, processor, processor.name )
|
49
|
+
end
|
50
|
+
app_meta = org.torquebox.base.metadata::RubyApplicationMetaData.new
|
51
|
+
app_meta.setApplicationName( "none" )
|
52
|
+
app_meta.setEnvironmentName( ENV['TORQUEBOX_ENV'] || 'development' )
|
53
|
+
app_meta.setRoot( org.jboss.vfs::VFS.getChild( Dir.pwd ) )
|
54
|
+
unit.addAttachment( org.torquebox.base.metadata::RubyApplicationMetaData.java_class, app_meta )
|
55
|
+
container.process_deployments(true)
|
56
|
+
end
|
57
|
+
|
58
|
+
def stop
|
59
|
+
container.undeploy( @deployment )
|
60
|
+
container.stop
|
61
|
+
end
|
62
|
+
|
63
|
+
def processors
|
64
|
+
@processors ||= []
|
65
|
+
end
|
66
|
+
|
67
|
+
private
|
68
|
+
|
69
|
+
def container
|
70
|
+
unless @container
|
71
|
+
|
72
|
+
unless( @options[:skip_naming] )
|
73
|
+
TorqueBox::Naming.configure do |config|
|
74
|
+
config.host = @options[:naming_host] unless @options[:naming_host].nil?
|
75
|
+
config.port = @options[:naming_port] unless @options[:naming_port].nil?
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
@container = TorqueBox::Container::Foundation.new
|
80
|
+
@container.enable( MessageProcessorHost )
|
81
|
+
end
|
82
|
+
@container
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
<!--
|
2
|
+
~ Copyright 2009 Red Hat, Inc.
|
3
|
+
~ Red Hat licenses this file to you under the Apache License, version
|
4
|
+
~ 2.0 (the "License"); you may not use this file except in compliance
|
5
|
+
~ with the License. You may obtain a copy of the License at
|
6
|
+
~ http://www.apache.org/licenses/LICENSE-2.0
|
7
|
+
~ Unless required by applicable law or agreed to in writing, software
|
8
|
+
~ distributed under the License is distributed on an "AS IS" BASIS,
|
9
|
+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
10
|
+
~ implied. See the License for the specific language governing
|
11
|
+
~ permissions and limitations under the License.
|
12
|
+
-->
|
13
|
+
|
14
|
+
<configuration xmlns="urn:hornetq"
|
15
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
16
|
+
xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
|
17
|
+
|
18
|
+
<clustered>true</clustered>
|
19
|
+
<security-enabled>false</security-enabled>
|
20
|
+
|
21
|
+
<log-delegate-factory-class-name>org.hornetq.integration.logging.Log4jLogDelegateFactory</log-delegate-factory-class-name>
|
22
|
+
|
23
|
+
<bindings-directory>${jboss.server.data.dir}/hornetq/bindings</bindings-directory>
|
24
|
+
|
25
|
+
<journal-directory>${jboss.server.data.dir}/hornetq/journal</journal-directory>
|
26
|
+
|
27
|
+
<journal-min-files>10</journal-min-files>
|
28
|
+
|
29
|
+
<large-messages-directory>${jboss.server.data.dir}/hornetq/largemessages</large-messages-directory>
|
30
|
+
|
31
|
+
<paging-directory>${jboss.server.data.dir}/hornetq/paging</paging-directory>
|
32
|
+
|
33
|
+
<connectors>
|
34
|
+
<connector name="netty">
|
35
|
+
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
|
36
|
+
<param key="host" value="${jboss.bind.address:localhost}"/>
|
37
|
+
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
|
38
|
+
</connector>
|
39
|
+
|
40
|
+
<connector name="netty-throughput">
|
41
|
+
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
|
42
|
+
<param key="host" value="${jboss.bind.address:localhost}"/>
|
43
|
+
<param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
|
44
|
+
<param key="batch-delay" value="50"/>
|
45
|
+
</connector>
|
46
|
+
|
47
|
+
<connector name="in-vm">
|
48
|
+
<factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class>
|
49
|
+
<param key="server-id" value="${hornetq.server-id:0}"/>
|
50
|
+
</connector>
|
51
|
+
|
52
|
+
</connectors>
|
53
|
+
|
54
|
+
<acceptors>
|
55
|
+
<acceptor name="netty">
|
56
|
+
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
|
57
|
+
<param key="host" value="${jboss.bind.address:localhost}"/>
|
58
|
+
<param key="port" value="${hornetq.remoting.netty.port:5445}"/>
|
59
|
+
</acceptor>
|
60
|
+
|
61
|
+
<acceptor name="netty-throughput">
|
62
|
+
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
|
63
|
+
<param key="host" value="${jboss.bind.address:localhost}"/>
|
64
|
+
<param key="port" value="${hornetq.remoting.netty.batch.port:5455}"/>
|
65
|
+
<param key="batch-delay" value="50"/>
|
66
|
+
</acceptor>
|
67
|
+
|
68
|
+
<acceptor name="in-vm">
|
69
|
+
<factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class>
|
70
|
+
<param key="server-id" value="0"/>
|
71
|
+
</acceptor>
|
72
|
+
|
73
|
+
</acceptors>
|
74
|
+
|
75
|
+
<broadcast-groups>
|
76
|
+
<broadcast-group name="bg-group1">
|
77
|
+
<group-address>231.7.7.7</group-address>
|
78
|
+
<group-port>9876</group-port>
|
79
|
+
<broadcast-period>5000</broadcast-period>
|
80
|
+
<connector-ref connector-name="netty"/>
|
81
|
+
</broadcast-group>
|
82
|
+
</broadcast-groups>
|
83
|
+
|
84
|
+
<discovery-groups>
|
85
|
+
<discovery-group name="dg-group1">
|
86
|
+
<group-address>231.7.7.7</group-address>
|
87
|
+
<group-port>9876</group-port>
|
88
|
+
<refresh-timeout>10000</refresh-timeout>
|
89
|
+
</discovery-group>
|
90
|
+
</discovery-groups>
|
91
|
+
|
92
|
+
<cluster-connections>
|
93
|
+
<cluster-connection name="my-cluster">
|
94
|
+
<address>jms</address>
|
95
|
+
<discovery-group-ref discovery-group-name="dg-group1"/>
|
96
|
+
</cluster-connection>
|
97
|
+
</cluster-connections>
|
98
|
+
|
99
|
+
<security-settings>
|
100
|
+
<security-setting match="#">
|
101
|
+
<permission type="createNonDurableQueue" roles="guest"/>
|
102
|
+
<permission type="deleteNonDurableQueue" roles="guest"/>
|
103
|
+
<permission type="consume" roles="guest"/>
|
104
|
+
<permission type="send" roles="guest"/>
|
105
|
+
</security-setting>
|
106
|
+
</security-settings>
|
107
|
+
|
108
|
+
<address-settings>
|
109
|
+
<!--default for catch all-->
|
110
|
+
<address-setting match="#">
|
111
|
+
<dead-letter-address>jms.queue.DLQ</dead-letter-address>
|
112
|
+
<expiry-address>jms.queue.ExpiryQueue</expiry-address>
|
113
|
+
<redelivery-delay>0</redelivery-delay>
|
114
|
+
<max-size-bytes>10485760</max-size-bytes>
|
115
|
+
<message-counter-history-day-limit>10</message-counter-history-day-limit>
|
116
|
+
<address-full-policy>BLOCK</address-full-policy>
|
117
|
+
</address-setting>
|
118
|
+
</address-settings>
|
119
|
+
|
120
|
+
</configuration>
|
@@ -0,0 +1,112 @@
|
|
1
|
+
<deployment xmlns="urn:jboss:bean-deployer:2.0">
|
2
|
+
|
3
|
+
<classloader><inject bean="JRubyClassLoader"/></classloader>
|
4
|
+
|
5
|
+
<!--
|
6
|
+
Naming/RMI-related
|
7
|
+
-->
|
8
|
+
|
9
|
+
<bean name="RMIClassProviderExecutor" class="java.util.concurrent.ThreadPoolExecutor">
|
10
|
+
<constructor factoryMethod="newFixedThreadPool" factoryClass="java.util.concurrent.Executors">
|
11
|
+
<parameter>2</parameter>
|
12
|
+
</constructor>
|
13
|
+
<stop method="shutdown"/>
|
14
|
+
</bean>
|
15
|
+
|
16
|
+
<bean name="RMIClassProvider" class="org.torquebox.containers.web.WebServer">
|
17
|
+
<property name="threadPool"><inject bean="RMIClassProviderExecutor"/></property>
|
18
|
+
<install method="setJavaRmiServerCodebase" state="Installed"/>
|
19
|
+
</bean>
|
20
|
+
<!--
|
21
|
+
HornetQ
|
22
|
+
-->
|
23
|
+
|
24
|
+
<!-- The core configuration -->
|
25
|
+
<bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration">
|
26
|
+
<property name="configurationUrl">${torquebox.hornetq.configuration.url}</property>
|
27
|
+
</bean>
|
28
|
+
|
29
|
+
<!-- MBean server -->
|
30
|
+
<bean name="MBeanServer" class="javax.management.MBeanServer">
|
31
|
+
<constructor factoryClass="java.lang.management.ManagementFactory"
|
32
|
+
factoryMethod="getPlatformMBeanServer"/>
|
33
|
+
</bean>
|
34
|
+
|
35
|
+
<!-- The security manager -->
|
36
|
+
<bean name="HornetQSecurityManager" class="org.hornetq.spi.core.security.HornetQSecurityManagerImpl">
|
37
|
+
<start ignored="true"/>
|
38
|
+
<stop ignored="true"/>
|
39
|
+
</bean>
|
40
|
+
|
41
|
+
<!-- The core server -->
|
42
|
+
<bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">
|
43
|
+
<constructor>
|
44
|
+
<parameter>
|
45
|
+
<inject bean="Configuration"/>
|
46
|
+
</parameter>
|
47
|
+
<parameter>
|
48
|
+
<inject bean="MBeanServer"/>
|
49
|
+
</parameter>
|
50
|
+
<parameter>
|
51
|
+
<inject bean="HornetQSecurityManager"/>
|
52
|
+
</parameter>
|
53
|
+
</constructor>
|
54
|
+
<start ignored="true"/>
|
55
|
+
<stop ignored="true"/>
|
56
|
+
</bean>
|
57
|
+
|
58
|
+
<bean name="JMSConfiguration" class="org.hornetq.jms.server.config.impl.JMSConfigurationImpl">
|
59
|
+
<constructor>
|
60
|
+
<parameter>
|
61
|
+
<list>
|
62
|
+
<bean name="ConnectionFactoryConfiguration" class="org.hornetq.jms.server.config.impl.ConnectionFactoryConfigurationImpl">
|
63
|
+
<constructor>
|
64
|
+
<parameter>ConnectionFactory</parameter>
|
65
|
+
<parameter>ConnectionFactory</parameter>
|
66
|
+
</constructor>
|
67
|
+
<property name="connectorNames">
|
68
|
+
<list>
|
69
|
+
<bean name="AnonPair" class="org.hornetq.api.core.Pair">
|
70
|
+
<constructor>
|
71
|
+
<parameter>netty</parameter>
|
72
|
+
<parameter><null/></parameter>
|
73
|
+
</constructor>
|
74
|
+
</bean>
|
75
|
+
</list>
|
76
|
+
</property>
|
77
|
+
</bean>
|
78
|
+
</list>
|
79
|
+
</parameter>
|
80
|
+
<parameter>
|
81
|
+
<list/>
|
82
|
+
</parameter>
|
83
|
+
<parameter>
|
84
|
+
<list/>
|
85
|
+
</parameter>
|
86
|
+
</constructor>
|
87
|
+
</bean>
|
88
|
+
|
89
|
+
<!-- The JMS server -->
|
90
|
+
<bean name="JMSServerManager" class="org.hornetq.jms.server.impl.JMSServerManagerImpl">
|
91
|
+
<constructor>
|
92
|
+
<parameter class="org.hornetq.core.server.HornetQServer">
|
93
|
+
<inject bean="HornetQServer"/>
|
94
|
+
</parameter>
|
95
|
+
<parameter class="org.hornetq.jms.server.config.JMSConfiguration">
|
96
|
+
<inject bean="JMSConfiguration"/>
|
97
|
+
</parameter>
|
98
|
+
</constructor>
|
99
|
+
<depends state="Started">RMIClassProvider</depends>
|
100
|
+
</bean>
|
101
|
+
|
102
|
+
<!--
|
103
|
+
TorqueBox
|
104
|
+
-->
|
105
|
+
|
106
|
+
<bean name="QueuesYamlParsingDeployer" class="org.torquebox.messaging.deployers.QueuesYamlParsingDeployer"/>
|
107
|
+
<bean name="TopicsYamlParsingDeployer" class="org.torquebox.messaging.deployers.TopicsYamlParsingDeployer"/>
|
108
|
+
|
109
|
+
<bean name="ManagedQueueDeployer" class="org.torquebox.messaging.deployers.ManagedQueueDeployer"/>
|
110
|
+
<bean name="ManagedTopicDeployer" class="org.torquebox.messaging.deployers.ManagedTopicDeployer"/>
|
111
|
+
|
112
|
+
</deployment>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<deployment xmlns="urn:jboss:bean-deployer:2.0">
|
2
|
+
|
3
|
+
<classloader><inject bean="JRubyClassLoader"/></classloader>
|
4
|
+
|
5
|
+
<bean name="MessageProcessorDeployer" class="org.torquebox.messaging.deployers.MessageProcessorDeployer"/>
|
6
|
+
|
7
|
+
<bean name="MessagingRuntimePoolDeployer" class="org.torquebox.messaging.deployers.MessagingRuntimePoolDeployer">
|
8
|
+
<property name="instanceFactoryName">RubyRuntimeFactory</property>
|
9
|
+
</bean>
|
10
|
+
|
11
|
+
</deployment>
|