Class: TorqueBox::Messaging::TransactedSession

Inherits:
Session
  • Object
show all
Defined in:
lib/torquebox/messaging/connection.rb

Constant Summary

Constants inherited from Session

Session::AUTO_ACK, Session::CLIENT_ACK, Session::DUPS_OK_ACK

Instance Attribute Summary collapse

Attributes inherited from Session

#jms_session

Instance Method Summary collapse

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) ⇒ TransactedSession

Returns a new instance of TransactedSession.



96
97
98
99
100
# File 'lib/torquebox/messaging/connection.rb', line 96

def initialize( jms_session, transaction, connection )
  super( jms_session )
  @transaction = transaction
  @connection = connection.extend(TransactedConnection)
end

Instance Attribute Details

#transactionObject (readonly)

Returns the value of attribute transaction.



94
95
96
# File 'lib/torquebox/messaging/connection.rb', line 94

def transaction
  @transaction
end

Instance Method Details

#afterCompletion(status) ⇒ Object



110
111
112
113
# File 'lib/torquebox/messaging/connection.rb', line 110

def afterCompletion(status)
  @connection.deactivate
  @connection.complete!
end

#beforeCompletionObject



106
107
108
# File 'lib/torquebox/messaging/connection.rb', line 106

def beforeCompletion
  # required interface
end

#closeObject



102
103
104
# File 'lib/torquebox/messaging/connection.rb', line 102

def close
  # eat the close, until tx completes
end