Class: TorqueBox::Messaging::XaSession

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

Constant Summary

Constant Summary

Constants inherited from Session

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

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

- (XaSession) initialize(jms_session, transaction, connection)

Returns a new instance of XaSession



25
26
27
28
29
# File 'messaging/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

- (Object) :transaction (readonly)

Returns the value of attribute :transaction



23
24
25
# File 'messaging/lib/torquebox/messaging/xa_session.rb', line 23

def :transaction
  @:transaction
end

Instance Method Details

- (Object) afterCompletion(status)



39
40
41
42
# File 'messaging/lib/torquebox/messaging/xa_session.rb', line 39

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

- (Object) beforeCompletion



35
36
37
# File 'messaging/lib/torquebox/messaging/xa_session.rb', line 35

def beforeCompletion
  # required interface
end

- (Object) close



31
32
33
# File 'messaging/lib/torquebox/messaging/xa_session.rb', line 31

def close
  # eat the close, until tx completes
end

- (Object) xa_resource



44
45
46
# File 'messaging/lib/torquebox/messaging/xa_session.rb', line 44

def xa_resource
  @jms_session.xa_resource
end