• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

why does jsf.js use a synchronous req here

 
Ranch Hand
Posts: 99
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While checking the console on ajax req I was surprised that I had that warning message in the dev tool console:



After investigation it seems like this is the cause of this :



Why is it probably the only correct way ?? And when is this used ?

source : http://grepcode.com/file/repo1.maven.org/maven2/com.sun.faces/jsf-impl/2.2.12/META-INF/resources/javax.faces/jsf-uncompressed.js?av=f
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, on casual reading of that code I'm not sure that it is a synchronous request. The comments could possibly be out of date.

There are 2 reasons why synchronous requests might be justified:

1. On the server side. If the request isn't idempotent, then having other requests serviced at the same time could scramble the results.

2. On the client side. If the xhs manager gets confused as to which received response it gets matches which request. Since web servers handle requests asynchronously (and often in parallel), it's possible for request A to precede request B, but get back request B's response before you got back the response for request A.
 
What's that smell? I think this tiny ad may have stepped in something.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic