anchor.diff:  | CometD 3.1.x
   
   |
  -====
  -[source,html]
  -[subs=+quotes]
  +[source,html,subs=+quotes]
   .index.html
   ----
   <!-- CometD 3.0.x with WAR overlays. -->
   <script type="text/javascript" src="**org/**cometd.js"></script>
   ----
  -====
  -|
  -====
  -[source,html]
  -[subs=+quotes]
  +|
  +[source,html,subs=+quotes]
   .index.html
   ----
   <!-- CometD 3.1.x with WAR overlays. -->
   <script type="text/javascript" src="**js/cometd/**cometd.js"></script>
   ----
  -====
  -
  -|
  -====
  -[source,javascript]
  -[subs=+quotes]
  +
  +|
  +[source,javascript,subs=+quotes]
   .application.js
   ----
   /// CometD 3.0.x with AMD.
   require({
  -        baseUrl: 'js/jquery',
  -        paths: {
  -            jquery: 'jquery-2.2.4',
  -            *org: '../org'*
  -        }
  -    },
  -    ['jquery','jquery.cometd'],
  -    function($, cometd) {
  -        ...
  -    });
  -----
  -====
  -|
  -====
  -[source,javascript]
  -[subs=+quotes]
  +  baseUrl: 'js/jquery',
  +  paths: {
  +    jquery: 'jquery-2.2.4',
  +    *org: '../org'*
  +  }
  +}, ['jquery','jquery.cometd'], function($, cometd) {
  +  ...
  +});
  +----
  +|
  +[source,javascript,subs=+quotes]
   .application.js
   ----
   /// CometD 3.1.x with AMD.
   require({
  -        baseUrl: "js/jquery",
  -        paths: {
  -            jquery: "jquery-3.5.1",
  -            *cometd: "../cometd"*
  -        }
  -    },
  -    ['jquery','jquery.cometd'],
  -    function($, cometd) {
  -        ...
  -    });
  -----
  -====
  -|===
  -
  -The xref:_extensions_reload[reload extension] has been rewritten to use the
  -`SessionStorage` rather than using short-lived cookies.
  +  baseUrl: "js/jquery",
  +  paths: {
  +    jquery: "jquery-3.5.1",
  +    *cometd: "../cometd"*
  +  }
  +}, ['jquery','jquery.cometd'], function($, cometd) {
  +  ...
  +});
  +----
  +|===
  +
  +The xref:_extensions_reload[reload extension] has been rewritten to use the `SessionStorage` rather than using short-lived cookies.
   
   Two new APIs are available to simplify sending messages with binary data:
   
  
positive.code: 
  [NOTE]
  ====
  The `load-on-startup` element is now required in order to use the `websocket` transport,
  unless Spring is used to configure the `BayeuxServer` object (see
  xref:_java_server_services_integration_spring_xml_based_spring_configuration[this section]).
  If `load-on-startup` is not specified, the first request will lazily start the CometD Servlet,
  which will start the `BayeuxServer` object, which will configure the `websocket` transport, but
  at this point it is too late for the `websocket` transport to handle the request, which will be
  handled by the next transport (typically the `long-polling` transport).
  ====
  
  ==== CometD Servlet Parameters Changes
  
  [cols="1,1,10", options="header"]
  |===
  | CometD 2
  | CometD 3
  | Notes
  
  | `logLevel`
  |
  | The parameter has been removed in CometD 3. +
    In CometD 3 logging levels are controlled by the logging framework
    implementation (for example, Log4J2).
  
  | `transports`
  | `transports`
  | The parameter changed its meaning. +
    In CometD 2 it is a comma separated list of class names of _additional_
    server transports. In CometD 3 it is a comma separated list of the server
    transports. +
    For example, in CometD 3
    `transports="org.cometd.server.websocket.jetty.JettyWebSocketTransport"`
    defines just one server transport: a `websocket` server transport based on
    Jetty WebSocket APIs.
  
  |
  | `ws.cometdURLMapping`
  | A new, *mandatory*, parameter for WebSocket server transports. +
    It's a comma separated list of the `url-pattern` strings defined by the
    `servlet-mapping` of the CometD Servlet, for example `+/cometd/*+`.
  |===
  
  ==== Method Signature Changes
  
  [cols="1a,1a", options="header"]
  |===
  | CometD 2
  | CometD 3
  
  | `BayeuxServer`::
      `createIfAbsent(String, ConfigurableServerChannel.Initializer...)`
  
negative.code: 
  ==== Deprecated API Removed
  
  A number of deprecated APIs (since 4.0.x) have been removed.
  
  [cols="1a,1a", options="header"]
  |===
  | CometD 4.0.x | CometD 5.0.x
  
  | `Message.getJSON()`
  | No replacement. +
    Use an implementation of `JSONContext.Client.generate(message)` on the client, or an implementation of `JSONContextServer.generate(message)` on the server.
  
  | `ClientSession.handshake(Map<String, Object>, **ClientSessionChannel**.MessageListener)`
  | `ClientSession.handshake(Map<String, Object>, **ClientSession**.MessageListener)`
  