Class: TorqueBox::Messaging::XaSession
- Defined in:
- lib/torquebox/messaging/xa_session.rb
Constant Summary
Constants inherited from Session
Session::AUTO_ACK, Session::CLIENT_ACK, Session::DUPS_OK_ACK, Session::SESSION_TRANSACTED
Instance Attribute Summary collapse
-
#transaction ⇒ Object
readonly
Returns the value of attribute transaction.
Attributes inherited from Session
Instance Method Summary collapse
- #afterCompletion(status) ⇒ Object
- #beforeCompletion ⇒ Object
- #close ⇒ Object
-
#initialize(jms_session, transaction, connection) ⇒ XaSession
constructor
A new instance of XaSession.
- #xa_resource ⇒ Object
Methods inherited from Session
canonical_ack_mode, #create_browser, #java_destination, #publish, #publish_and_receive, #queue_for, #receive, #receive_and_publish, #unsubscribe
Constructor Details
#initialize(jms_session, transaction, connection) ⇒ XaSession
Returns a new instance of XaSession.
25 26 27 28 29 |
# File 'lib/torquebox/messaging/xa_session.rb', line 25 def initialize( jms_session, transaction, connection ) super( jms_session ) @transaction = transaction @connection = connection end |
Instance Attribute Details
#transaction ⇒ Object (readonly)
Returns the value of attribute transaction.
23 24 25 |
# File 'lib/torquebox/messaging/xa_session.rb', line 23 def transaction @transaction end |
Instance Method Details
#afterCompletion(status) ⇒ Object
39 40 41 42 |
# File 'lib/torquebox/messaging/xa_session.rb', line 39 def afterCompletion(status) @connection.deactivate @connection.complete! end |
#beforeCompletion ⇒ Object
35 36 37 |
# File 'lib/torquebox/messaging/xa_session.rb', line 35 def beforeCompletion # required interface end |
#close ⇒ Object
31 32 33 |
# File 'lib/torquebox/messaging/xa_session.rb', line 31 def close # eat the close, until tx completes end |
#xa_resource ⇒ Object
44 45 46 |
# File 'lib/torquebox/messaging/xa_session.rb', line 44 def xa_resource @jms_session.xa_resource end |