Wicket
  1. Wicket
  2. WICKET-4723

tracking id retrieved in AtmosphereBehavior#onRequest() is always 0

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.0-beta3
    • Fix Version/s: 6.6.0
    • Component/s: wicket-atmosphere
    • Labels:
      None

      Description

      jquery.atmosphere.js will always use 0 as initial tracking-id to send request,
      and then reassign it from server response.

      AtmosphereBehavior#getUUID() shouldn't return the tracking-id from request header, since the initial request's tracking-id is 0.
      The correct way to retrieve tracking-id is calling AtmosphereResource#uuid()

        Activity

        Hide
        Emond Papegaaij added a comment -

        This has been fixed some time ago.

        Show
        Emond Papegaaij added a comment - This has been fixed some time ago.
        Hide
        Sean Lin added a comment - - edited

        a related issue of atmosphere.
        https://github.com/Atmosphere/atmosphere/issues/544

        AtmosphereResource#uuid() will be fixed to return the right tracking-id

        Show
        Sean Lin added a comment - - edited a related issue of atmosphere. https://github.com/Atmosphere/atmosphere/issues/544 AtmosphereResource#uuid() will be fixed to return the right tracking-id
        Hide
        Emond Papegaaij added a comment -

        I've added a fallback in case the uuid is "0". For a real solution, I need Jeanfrancois Arcand to explain how this is supposed to work in Atmosphere.

        Show
        Emond Papegaaij added a comment - I've added a fallback in case the uuid is "0". For a real solution, I need Jeanfrancois Arcand to explain how this is supposed to work in Atmosphere.
        Hide
        Sean Lin added a comment -

        After some tracing and testing, I found that AtmosphereResource#uuid() wil return wrong tracking-id under some circumstances.

        The uuid in AtmosphereResource is retrieved from "response" header X_ATMOSPHERE_TRACKING_ID, but it's set only when the "request" header X_ATMOSPHERE_TRACKING_ID is null or equals "0".

        This should be a issue of atmosphere, but currently to work with atmosphere 1.0.0.beta5, the only way to get the correct tracking-id I can see is via
        resource.getRequest().getAttribute(ApplicationConfig.SUSPENDED_ATMOSPHERE_RESOURCE_UUID);

        the resource above is AtmosphereResource.

        Show
        Sean Lin added a comment - After some tracing and testing, I found that AtmosphereResource#uuid() wil return wrong tracking-id under some circumstances. The uuid in AtmosphereResource is retrieved from "response" header X_ATMOSPHERE_TRACKING_ID, but it's set only when the "request" header X_ATMOSPHERE_TRACKING_ID is null or equals "0". This should be a issue of atmosphere, but currently to work with atmosphere 1.0.0.beta5, the only way to get the correct tracking-id I can see is via resource.getRequest().getAttribute(ApplicationConfig.SUSPENDED_ATMOSPHERE_RESOURCE_UUID); the resource above is AtmosphereResource.

          People

          • Assignee:
            Emond Papegaaij
            Reporter:
            Sean Lin
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development