Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-12204

Deferred not working with tomcat 8

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 4.0.6, 4.1 GA
    • Fix Version/s: None
    • Component/s: Web
    • Last commented by a User:
      true

      Description

      I have a fully working program in tomcat 7 (spring 4.0.6) that uses DeferredResult .
      I am using long polling to get a message from the server, and when a message is dispatched it immediately reaches the client.

      After upgrading to tomcat 8 (tried pivotal TC server 3.0.0 as well as Tomcat 8.0.11), this stops working and client waits forever for a response.
      After a while the messages do appear on the client's end.

      I tried upgrading to spring 4.1 and this did not help.

      The only resolution I've found is going back to tomcat 7 or making my function that runs deferredResult.setResult(...) @Async (not sure why this resolves the issue... maybe because it leaves tomcat http threads and moves to my thread pool?).

      May this be related to tomcat 8 using NIO connector as default?

        Attachments

          Activity

            People

            Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            mooshben Moosh Ben
            Last updater:
            Spring Issuemaster
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 37 weeks ago