Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2487

Incorrect acknowledge mode returned by JmsActivationSpec

XMLWordPrintable

      The JmsActivationSpec implementation defaults the acknowledgeMode to javax.jms.Session.SESSION_TRANSACTED, or 0, seemingly by mistake. setAcknowledgeMode() does not honor the value "SESSION_TRANSACTED". getAcknowledgeMode() assumes that the acknowledgeMode is either DUPS_OK_ACKNOWLEDGE (explicit) or AUTO_ACKNOWLEDGE (everything else).

      This caused consternation when I was debugging. My log file informed me that I was using the wrong acknowledge mode (ack=AUTO_ACKNOWLEDGE) for the transaction mode (tx=false).

      There are two possible fixes:
      1. Default acknowledgeMode to Session.AUTO_ACKNOWLEDGE. This would make getAcknowledgeMode() and toString() return consistent results.
      2. Add support for all four Session acknowledge modes. This would make the default acceptable, but the accessors would need to be modified.

      One other note: Depending on the solution, it may be wise to change setSessionTransacted() to update acknowledgeMode. For instance, it seems weird to allow the JmsActivationSpec to be in a state such that sessionTransaction=false but acknowledgeMode=Session.SESSION_TRANSACTED.

            adrian.brock Adrian Brock (Inactive)
            pamdirac_jira John McNair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 minutes
                4m
                Remaining:
                Remaining Estimate - 4 minutes
                4m
                Logged:
                Time Spent - Not Specified
                Not Specified