Skip to main content

Developing with XCC

Enable HTTP 1.1 Compliance  

Enabling HTTP compliant mode guarantees the traffic between your XDBC App Server and your XCC client is compliant with the HTTP 1.1 protocol. This enables properly configured load balancers to detect the SessionID cookie generated by MarkLogic Server and use it to enforce session affinity.

To enable this mode for a Java application, set the xcc.httpcompliant system property to true on the Java command line. For example:

java -Dxcc.httpcompliant=true ...

Note

Setting xcc.httpcompliant to true is incompatible with enabling content entity resolution using ContentCreateOptions.setResolveEntities.

If xcc.httpcompliant is not set explicitly, then xcc.httpcompliant is false.

You must also configure your load balancer to use the value in the SessionID cookie for session affinity. Some routers or load balancers may need to have xcc.httpcompliant enabled to allow any traffic through, regardless of session affinity issues.