Loading TOC...
XCC Developer's Guide (PDF)

XCC Developer's Guide — Chapter 1

Introduction to XCC

The XML Contentbase Connector (XCC) is an interface to communicate with MarkLogic Server from a Java or .NET middleware application layer. This chapter provides background on XCC and includes the following sections:

Overview of XCC

The XML Contentbase Connector (XCC) is used to communicate between a Java or .NET application layer and MarkLogic Server using the XDBC protocol.

This section provides an overview of XCC and includes the following parts:

XCC Client Libraries Communicate With an XDBC Server

XCC has a set of client libraries that you use to build applications that communicate with MarkLogic Server. There are Java and .NET versions of the client libraries. XCC requires that an XDBC server is configured in MarkLogic Server.

An XDBC server responds to XDBC and XCC requests. XDBC and XCC use the same wire protocol to communicate with MarkLogic Server. You can write applications either as standalone applications or ones that run in an application server environment. Your XCC-enabled application connects to a specified port on a system that is running MarkLogic Server, and communicates with MarkLogic Server by submitting requests (for example, XQuery statements) and processing the results returned by those programs. These XQuery programs can incorporate calls to XQuery functions stored and accessible by MarkLogic Server, and accessible from any XDBC-enabled application. The XQuery programs can perform the full suite of XQuery functionality, including loading, querying, updating and deleting content.

XQuery requests submitted via XCC return results as specified by the XQuery code. These results can include XML and a variety of other datatypes. It is the XCC application's responsibility to parse, process and interpret these results in a manner appropriate to the variety of datatypes available. There are a number of publicly available libraries for assisting with this task, or you may write your own code. In order to accept connections from XCC-enabled applications, MarkLogic Server must be configured with an XDBC Server listening on the designated port. Each XDBC Server connects by defaut to a specific database within MarkLogic Server, but XCC provides the ability to communicate with any database in the MarkLogic Server cluster to which your application connects (and for which you have the necessary permissions and privileges).

Client-Server Architecture

XCC communicates with MarkLogic Server with a client-server architecture, where the XCC application is the client and MarkLogic Server is the server. The following figure illustrates the high-level architecture:

As shown in the diagram above, the XCC-enabled application can run on the same system as an instance of MarkLogic Server (a host), or it can run on a completely different system, as long as the two systems are networked together.

In the diagram, the XCC application running on System A has opened an XDBC connection to port x1 on System B. On System B, MarkLogic Server is configured with an XDBC Server listening to port x1, and that XDBC Server connects to databased1. Consequently, the configuration shown in the diagram above allows the XCC application on System A to submit XQuery requests (including query, load, update and delete) for evaluation against databased1.

Automatically Pools Connections

XCC automatically does connection pooling, so you do not need to write any connection pooling logic in your application. The XCC Session object automatically obtains and releases connections for XCC applications as needed.

API and Other Documentation

This document provides an introduction to the XCC developer libraries. For detailed API documentation for XCC and for MarkLogic Server, or to learn how to configure XDBC servers in MarkLogic Server, see the appropriate documents:

XCC Requirements

This section lists the requirements for XCC and has the following parts:

XCC MarkLogic Server Requirements

XCC requires MarkLogic Server 6.0-1 or later.

Note that not all XCC features are usable with all versions of MarkLogic Server. For example, you must have MarkLogic 8 or later to use the Server-Side JavaScript and JSON features with XCC/J.

XML Contentbase Connector for Java (XCC/J) Requirements

XCC/J has the following requirements:

  • Java 1.7 or later
  • MarkLogic Server 6.0-1 or later (on any platform)

Note that not all XCC features are available with all versions of MarkLogic Server.

You must have MarkLogic 8 or later to use the Server-Side JavaScript and JSON features of XCC/J, and your classpath must include Jackson JAR files for Jackson version 2.5 or later. For more information about Jackson, see http://github.com/FasterXML/jackson.

To use XCC in an environment that includes a load balancer between MarkLogic and your XCC application, some configuration is required. For details, see Using a Load Balancer or Proxy Server with an XCC Application.

XML Contentbase Connector for .NET (XCC/.NET) Requirements

XCC/.NET has the following requirements:

  • .NET 2.0 Service Pack 1 (SP1), or later
  • MarkLogic Server 6 or later (on any platform)

Note that not all XCC features are available with all versions of MarkLogic Server.

« Table of contents
Next chapter »
Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy