Module: JSparrow::Connection
- Defined in:
- lib/connection.rb
Defined Under Namespace
Classes: Client, ClientInitializationError, ConnectionProperties, InvalidClientStateError
Class Method Summary collapse
-
.configure {|@@properties| ... } ⇒ Object
Metodo usado para configurar a conexao com o middleware de JMS.
-
.connection_properties ⇒ Object
Metodo usado para obter a configuracao para conexao com o middleware de JMS.
-
.new_client ⇒ Object
Metodo usado para criar um novo Client JMS.
Class Method Details
.configure {|@@properties| ... } ⇒ Object
Metodo usado para configurar a conexao com o middleware de JMS.
11 12 13 14 15 |
# File 'lib/connection.rb', line 11 def self.configure @@properties = ConnectionProperties.new yield @@properties end |
.connection_properties ⇒ Object
Metodo usado para obter a configuracao para conexao com o middleware de JMS.
20 21 22 |
# File 'lib/connection.rb', line 20 def self.connection_properties @@properties end |
.new_client ⇒ Object
Metodo usado para criar um novo Client JMS.
27 28 29 30 31 |
# File 'lib/connection.rb', line 27 def self.new_client jndi_context_builder = JNDI::ContextBuilder.new(@@properties.jms_client_jar, @@properties.jndi_properties) Client.new(@@properties, jndi_context_builder) end |