Loading TOC...
Administrator's Guide (PDF)

MarkLogic 9 Product Documentation
Administrator's Guide
— Chapter 8

XDBC Servers

This chapter describes XDBC servers and provides procedures for configuring them. The following sections are included:

This chapter describes how to use the Admin Interface to create and configure XDBC servers. For details on how to create and configure XDBC servers programmatically, see Creating and Configuring App Servers in the Scripting Administrative Tasks Guide.

XDBC Server Overview

XDBC (XML Database Connector) servers are defined at the group level and are accessible by all hosts within the group. Each XDBC server provides access to a specific forest, and to a library (root) of XQuery programs that reside within a specified directory structure. Applications execute by default against the database that is connected to the XDBC server.

XDBC Servers allow XML Contentbase Connector (XCC) applications to communicate with MarkLogic Server. XCC is an API used to communicate with MarkLogic Server from Java middleware applications. XDBC servers also allow old-style XDBC applications to communicate with MarkLogic Server, although XDBC applications cannot use certain 3.1 and newer features (such as point-in-time queries). Both XCC and XDBC applications use the same wire protocol.

XQuery requests submitted via XCC return results as specified by the XQuery code. These results can include XML and a variety of other data types. It is the XCC application's responsibility to parse, process and interpret these results in a manner appropriate to the variety of data types 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 default 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).

XDBC servers follow the MarkLogic Server security model, as do HTTP and WebDAV servers. The server authenticates access to those programs using user IDs and passwords stored in the security database for that XDBC server. (Each XDBC server is connected to a database, and each database is in turn connected to a security database in which security objects such as users are stored.)

Granular access control to the system and to the data is achieved through the use of privileges and permissions. For details on configuring security objects in MarkLogic Server, see Security Administration. For conceptual information on the MarkLogic Server security model, see Security Guide.

Procedures for Creating and Managing XDBC Servers

Use the following procedures to create and manage XDBC servers:

For the procedure to cancel a running request on an XDBC server, see Canceling a Request.

Creating a New XDBC Server

To create a new server, complete the following steps:

  1. Click the Groups icon.
  2. Click the group in which you want to define the XDBC server (for example, Default).
  3. Click the App Servers icon on the left tree menu.
  4. Click the Create XDBC tab at the top right. The Create XDBC Server page displays.

  1. In the XDBC Server Name field, enter a shorthand name for this XDBC server. MarkLogic Server will use this name to refer to this server on display screens in the Admin Interface.
  2. In the Root directory field, enter the name of the directory in which you will store your XQuery programs. If the Modules field is set to a database, then the root must be a directory URI in the specified modules database.

    If the Modules field is set to file system, then the root directory is either a fully-qualified pathname or is relative to the directory in which MarkLogic Server is installed. The following table shows the default installation directory for each platform:

    Platform Program Directory
    Microsoft Windows
    C:\Program Files\MarkLogic
    Red Hat Linux
    /opt/MarkLogic
    Mac OS X
    ~/Library/MarkLogic

    Unless you specify a shared drive, all hosts in the group will need to have a copy of the XQuery programs in the directory specified above.

    Do not create XDBC server root directories named Docs, Data or Admin. These directories are reserved by MarkLogic Server for other purposes. Creating XDBC server root directories with these names can result in unpredictable behavior of the server and may also complicate the software upgrade process.

  3. In the Port field, enter the port number through which you want to make this XDBC server available.

    The port number must not be assigned to any other XDBC, HTTP, or WebDAV server.

  4. In the Modules field, select the database to use as the modules database for your XQuery documents, or leave it at the default of storing your XQuery modules on the file system. For information on what a modules database is, see Modules Database.
  5. In the Database field, select the database to be accessed by this XDBC server. Multiple HTTP, XDBC, and WebDAV servers can access the same database.
  6. Scroll to the Authentication field. Select an authentication scheme, as described in Types of Authentication in the Security Guide. The default is digest, which uses encrypted passwords.

  7. Scroll to the Privilege field near the bottom of the screen. This field represents the privilege needed to access (login to) the server. You may leave this field blank.

    A user accessing the XDBC server must have the execute privilege selected in order to access the XDBC server (or be a member of the admin role).

  8. Set any other properties for this App Server, as appropriate to your needs:
    • Last Login and Display Last Login are described in Storing and Monitoring the Last User Login Attempt.
    • Backlog specifies the maximum number of pending connections allowed on the HTTP server socket.
    • Threads specifies the maximum number of App Server threads.
    • Request Timeout specifies the maximum number of seconds before a socket receives a timeout for the first request.
    • Keep Alive Timeout specifies the maximum number of seconds before a socket receives a timeout for subsequent requests over the same connection.
    • Session Timeout specifies the maximum number of seconds before an inactive session times out.
    • Max Time Limit specifies the upper bound for any request's time limit. No request may set its time limit (for example with xdmp:set-request-time-limit) higher than this number. The time limit, in turn, is the maximum number of seconds allowed for servicing a query request. The App Server gives up on queries which take longer, and returns an error.
    • Default Time Limit specifies the default value for any request's time limit, when otherwise unspecified. A request can change its time limit using xdmp:set-request-time-limit. The time limit, in turn, is the maximum number of seconds allowed for servicing a query request. The App Server gives up on queries which take longer, and returns an error.
    • Pre-commit Trigger Limit specifies the maximum number of pre-commit triggers a single statement against this App Server can invoke. For more information on triggers, see Using Triggers to Spawn Actions in the Application Developer's Guide.
    • Pre-commit Trigger Depth specifies the maximum depth (how many triggers can cause other triggers to fire, which in turn cause others to fire, and so on) for pre-commit triggers that are executed against this App Server. For more information on triggers, see Using Triggers to Spawn Actions in the Application Developer's Guide.
    • Collation specifies the default collation for queries run in this appserver. This will be the collation used for string comparison and sorting if none is specified in the query. For details, see Encodings and Collations in the Search Developer's Guide.
    • Concurrent Request Limit specifies the maximum number of requests any user may have running at a specific time. 0 indicates no maximum. For details, see Managing Concurrent User Sessions.
    • Log Errors specifes whether to log uncaught errors for this App Server to the ErrorLog.txt file. This is useful to log exceptions that might occur on an App Server for later debugging.
    • Debug Allow specifies whether to allow requests against this App Server to be stopped for debugging, using the MarkLogic Server debugging APIs.
    • Profile Allow specifies whether to allow requests against this App Server to be profiled, using the MarkLogic Server profiling APIs. For details, see Profiling Requests to Evaluate Performance in the Query Performance and Tuning guide.
    • Default XQuery Version specifies the default XQuery language for this App Server if an XQuery module does explicitly declare its language version.
    • Multi Version Concurrency Control specifies how strict queries behave about getting the latest timestamp. This only affects query statements, not update statements. For details about queries and transactions in MarkLogic Server, see Understanding Transactions in MarkLogic Server in the Application Developer's Guide.
    • The properties associated with SSL support are described in Configuring SSL on App Servers in the Security Guide.
  9. Scroll to the top or bottom and click OK.

The new XDBC server is created. Creating an XDBC server is a hot admin task; the changes take effect immediately. For information and setup instructions for managing user sessions and/or keeping track of login attempts, see Managing User Sessions and Monitoring Login Attempts.

Setting Output Options for an XDBC Server

For each XDBC Server, you can set various default output options. These output options affect how data returned from the App Server is serialized. You can also set these options at the query level to override any default options. You can set serialization options to override the App Server defaults in XQuery with the declare option XQuery prolog, and in XSLT using the <xsl:output> instruction. For details on setting the serialization options in XQuery, see Declaring Options in the XQuery and XSLT Reference Guide. For XSLT output details, see the XSLT specification (http://www.w3.org/TR/xslt20#serialization).

To specify defaults for the App Server, complete the following steps:

  1. Click the Groups icon in the left tree menu.
  2. Click the group which contains the XDBC server you want to view (for example, Default).
  3. Click the App Servers icon on the left tree menu.
  4. Select the App Server to edit.
  5. Select the Output Options link in the left tree menu. The Output Options Configuration page displays.
  6. Set any options that you want to control for this App Server.
  7. Click OK to save your changes.

For more details about App Server output, see Controlling App Server Access, Output, and Errors in the Application Developer's Guide.

Viewing XDBC Server Settings

To view the settings for an XDBC server, complete the following steps:

  1. Click the Groups icon.
  2. Click the group which contains the XDBC server you want to view (for example, Default).
  3. Click the App Servers icon on the left tree menu.
  4. Locate the XDBC server for which you want to view settings, either in the tree menu or on the summary page.
  5. Click the icon for the XDBC server.
  6. View the settings.

Deleting an XDBC Server

To delete the settings for an XDBC server, complete the following steps:

  1. Click on the Groups icon.
  2. Click on the group which contains the XDBC server you want to delete (for example, Default).
  3. Click the App Servers icon on the left tree menu.
  4. Locate the XDBC server to be deleted, either in the tree menu or on the summary page.
  5. Click the icon for this XDBC server.
  6. Click Drop.
  7. A confirmation message displays. Confirm the delete and click OK.

Deleting an XDBC server is a cold admin task; the server restarts to reflect your changes.

« Previous chapter
Next chapter »