lib/hornetq/server.rb in jruby-hornetq-0.3.1 vs lib/hornetq/server.rb in jruby-hornetq-0.3.2
- old
+ new
@@ -39,15 +39,27 @@
end
acceptor_conf_set = java.util.HashSet.new
acceptor_conf_set.add(acceptor)
config.acceptor_configurations = acceptor_conf_set
+ more_acceptors = params.delete(:acceptor)
+ if more_acceptors
+ more_acceptors = [more_acceptors] unless more_acceptors.kind_of?(Array)
+ more_acceptors.each do |uri_str|
+ uri = HornetQ::URI.new(uri_str)
+ p = uri.params.merge('host' => uri.host, 'port' => uri.port)
+ puts p.inspect
+ accept = Java::org.hornetq.api.core.TransportConfiguration.new(HornetQ::NETTY_ACCEPTOR_CLASS_NAME, p)
+ acceptor_conf_set.add(accept)
+ end
+ end
+
if Java::org.hornetq.core.journal.impl.AIOSequentialFileFactory.isSupported
config.journal_type = Java::org.hornetq.core.server.JournalType::ASYNCIO
else
require 'rbconfig'
if Config::CONFIG['target_os'] == 'linux'
- HornetQ.logger.info("AIO wasn't located on this platform, it will fall back to using pure Java NIO. Install LibAIO to enable the AIO journal")
+ HornetQ.logger.info("AIO wasn't located on this platform, it will fall back to using pure Java NIO. Install libaio and libHornetQAIO to enable the AIO journal")
end
config.journal_type = Java::org.hornetq.core.server.JournalType::NIO
end
if params[:backup]