Changeset 235

Show
Ignore:
Timestamp:
12/14/06 16:19:30 (2 years ago)
Author:
sacha
Message:

it is not necessary to close a http connection that is already on the response leg.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/message-handling-refactor-branch/src/hefeweizen_big_ania.rb

    r234 r235  
    11011101            if ebMS_info['info']['mc-syncReplyMode'] == 'none' then 
    11021102              @logger.debug "The CPA indicates that the response ebXML message must be sent asynchronously. So closing connection first (if there is a connection)." 
    1103               close_open_connection instruction_pipe, transaction 
     1103              close_open_connection command_hash, instruction_pipe, transaction 
    11041104              @logger.debug "The response ebXML message must be sent asynchronously ... so starting the delivery process for this new ebXML message." 
    11051105               
    11061106              # CREATING A NEW TRANSACTION FOR NEW ASYNC EBXML MESSAGE 
    11071107              # ------------------------------------------------------ 
    1108                
    11091108               
    11101109              new_transaction = @transaction_manager.get_new_transaction b2b_system.system_name 
     
    11561155            elsif ebMS_info['info']['mc-syncReplyMode'] == 'signalsOnly' 
    11571156              @logger.warn "signalsAndResponse as syncReplyMode not implemented." 
    1158               close_open_connection instruction_pipe, transaction 
     1157              close_open_connection command_hash, instruction_pipe, transaction 
    11591158              # ???? 
    11601159              return false 
     
    11621161            elsif ebMS_info['info']['mc-syncReplyMode'] == 'signalsAndResponse' 
    11631162              @logger.warn "signalsAndResponse as syncReplyMode not implemented." 
    1164               close_open_connection instruction_pipe, transaction 
     1163              close_open_connection command_hash, instruction_pipe, transaction 
    11651164              # ???? 
    11661165              return false 
     
    11681167            elsif ebMS_info['info']['mc-syncReplyMode'] == 'responseOnly' 
    11691168              @logger.warn "signalsAndResponse as syncReplyMode not implemented." 
    1170               close_open_connection instruction_pipe, transaction 
     1169              close_open_connection command_hash, instruction_pipe, transaction 
    11711170              # ???? 
    11721171              return false 
     
    11741173            else 
    11751174              @logger.debug "Unknown syncReplyMode '#{ebMS_info['info']['mc-syncReplyMode']}'. Not returning new responses." 
    1176               close_open_connection instruction_pipe, transaction 
     1175              close_open_connection command_hash, instruction_pipe, transaction 
    11771176              # ???? 
    11781177              return false 
     
    11911190      else           
    11921191        @logger.debug "There are no responses to be delivered. Closing any open connection" 
    1193         close_open_connection instruction_pipe, transaction 
     1192        close_open_connection command_hash, instruction_pipe, transaction 
    11941193       
    11951194      end # if new_delivery == true 
     
    12141213    end 
    12151214 
    1216     def close_open_connection instruction_pipe, transaction 
     1215    def close_open_connection command_hash, instruction_pipe, transaction 
     1216      if command_hash['transport_protocol'].upcase == 'HTTP' then 
     1217        if command_hash["transport_request_or_response"] = "response" then 
     1218          @logger.debug "There is nothing to be closed because we are already on the HTTP response leg." 
     1219          return true 
     1220        end 
     1221      end 
     1222 
    12171223      command_to_http_server = { 
    12181224        "from" => "big_ania",