Class: TorqueBox::Messaging::XaConnectionFactory
- Inherits:
-
ConnectionFactory
- Object
- ConnectionFactory
- TorqueBox::Messaging::XaConnectionFactory
- Defined in:
- lib/torquebox/messaging/xa_connection_factory.rb
Instance Attribute Summary
Attributes inherited from ConnectionFactory
Instance Method Summary collapse
Methods inherited from ConnectionFactory
#activate, #connections, #create_connection, #create_connection_factory, #create_internal_connection_factory, #create_xa_connection, #current, #deactivate, #initialize, new, #transaction
Constructor Details
This class inherits a constructor from TorqueBox::Messaging::ConnectionFactory
Instance Method Details
#to_s ⇒ Object
39 40 41 |
# File 'lib/torquebox/messaging/xa_connection_factory.rb', line 39 def to_s "[XaConnectionFactory: internal_connection_factory=#{internal_connection_factory}]" end |
#with_new_connection(options, &block) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/torquebox/messaging/xa_connection_factory.rb', line 25 def with_new_connection(, &block) client_id = [:client_id] connection = create_xa_connection( ) connection.client_id = client_id connection.start begin result = block.call( connection ) ensure connection.close end return result end |