Getting Started with QuarkXPress Server 2018 - February 2019 Update

Deploying QuarkXPress Server Manager

There are three ways to deploy QuarkXPress Server Manager:

  • As a standalone server. To deploy QuarkXPress Server Manager in this manner, install the software as described in "Installing QuarkXPress Server Manager," then double-click the server/QXPSMServerStart.command (Mac OS X) or server/QXPSMServerStart.bat (Windows) file in the QuarkXPress Server Manager application folder.

  • As an independent Web application in an existing Tomcat Web container. For more information, see "Deploying QXPSM in external Tomcat."

  • As a Web application that shares the same Spring context. For more information, see "Deploying QXPSM in a shared Spring context."

Installing QuarkXPress Server Manager

QuarkXPress® Server Manager coordinates rendering requests in a multiple QuarkXPress Server instance environment, using load-balancing, fail-safe, and caching capabilities to determine which server in the pool can best process each document request. If the first QuarkXPress Server instance in an array is unable to process a render request, QuarkXPress Server Manager sends the request to another instance. QuarkXPress Server Manager also provides an object-oriented programming environment for working with QuarkXPress Server, and it exposes a set of Web services and Web objects that can be used in any SOAP-compatible environments such as .NET, JavaScript™, Java™, and Objective-C.

The QuarkXPress Server Manager installation includes three primary components:

  • QuarkXPress Server Manager Server (the server application that provides services for load-balancing, fault-tolerance, and the SOAP server that allows third-party communication with QuarkXPress Server instances through Web services).

  • The QuarkXPress Server Manager Web-based administrative client.

  • The QuarkXPress Server SDK, which includes Web services API documentation; Web service stubs and samples for .NET, Java, and Objective-C; and an Extensibility Tool for generating custom stubs. This component is helpful for developing client-side solutions using the QuarkXPress Server Manager Web services and servlet interface.

Installing QuarkXPress Server Manager: macOS

You must uninstall the previous version of QuarkXPress Server Manager before installing this version. See "Uninstalling" for more information.

To install QuarkXPress Server Manager:

  1. Disable any virus protection software. If you are concerned about a virus infecting your computer, run a virus check on the installer file and then disable your virus detection software.

  2. Double-click the Installer icon and follow the instructions on the screen.

  3. In the QuarkXPress Server Manager Server Port Settings screen, enter a port number for the QuarkXPress Server Manager server's Tomcat server and specify the location of the QuarkXPress Server Manager cache folder. (The cache folder will store temporary copies of content generated by the QuarkXPress Server instances that are managed by this QuarkXPress Server Manager server.)

  4. Complete the installation.

Installing QuarkXPress Server Manager: Windows

You must uninstall the previous version of QuarkXPress Server Manager before installing this version. See "Uninstalling" for more information.

To install QuarkXPress Server Manager:

  1. Disable any virus protection software. If you are concerned about a virus infecting your computer, run a virus check on the installer file and then disable your virus detection software.

  2. Double-click the Installer icon and follow the instructions on the screen.

  3. When the Destination Folder screen displays:

    • The screen displays the drive and folder where QuarkXPress Server will be installed. To install QuarkXPress Server elsewhere, click Browse and navigate to the desired folder.

    • Enter a port number for QuarkXPress Server Manager.

    • Specify a cache folder location. (The cache folder will store temporary copies of content generated by the QuarkXPress Server instances that are managed by this QuarkXPress Server Manager server.)

    • To install QuarkXPress Server Manager Server as a service, check Install QuarkXPress Server Manager Server as a Service.

  4. Complete the installation.

Deploying QXPSM in a shared Spring context

In this type of deployment, QuarkXPress Server Manager can be embedded in a Spring application and can share the same Spring container instance and Spring context. This deployment model also allows the consuming of QuarkXPress Server Manager services (RequestService and AdminService) as POJOs (plain old Java objects).

This type of deployment model is possible only when the application in which QuarkXPress Server Manager is to be embedded is a Spring application and is deployed with an embedded or external Tomcat Web container.

To install QuarkXPress Server Manager in a shared Spring context:

  1. Copy the qxpsm and qxpsmadmin Web application to the webapps folder for your existing application, so that QuarkXPress Server Manager can be recognized as a Web application in the existing Web container.

    • Set cacheFolderContextFile to the path of the "cache.xml" file relative to the current working directory.

    • Set serverXmlFilePath to the path of the "Server.xml" file relative to the current working directory.

  2. Copy all QXPSM-dependent jar files from [QXPSM_Home]/Server/dependencies and [QXPSM_Home]/Server/lib to a common location, then add all of these jar files to the application classpath so that they are available to other Web applications that want to use the QuarkXPress Server Manager API locally.

  3. Import the QuarkXPress Server Manager Spring context file, "ManagerContainerConfig.xml," into the existing application Spring context.

  4. Create a Java class named CustomContextLoaderListener that extends org.springframework.web.context.ContextLoaderListener. Override the method loadParentContext() as shown here:

    public class CustomContextLoaderListener extends org.springframework.web.context.ContextLoaderListener 
    {
       private static final Logger logger =  Logger.getLogger(GlobalContextLoaderListener.class);
       public void contextInitialized(ServletContextEvent servletContextEvent)
       {
          super.contextInitialized(servletContextEvent);
          String contextName = servletContextEvent.getServletContext().getServletContextName();
       }
       protected ContextLoader createContextLoader()
       {
          return new CustomContextLoader();
       }
       class CustomContextLoader extends ContextLoader
       {
          protected ApplicationContext loadParentContext(ServletContext servletContext)
          {
             //=============================================================
             //Here, returns the spring context to be used as parent context
             //=============================================================
             return com.xyz.myapplication.MyApplicationContext.getContext();
          }
          protected WebApplicationContext createWebApplicationContext(ServletContext servletContext, ApplicationContext       parent)
          {
             return super.createWebApplicationContext(servletContext, parent);
          }
       }
    }
  5. Create a file named "applicationContext.xml" in webapps/qxpsm/WEB-INF and fill it with the following content:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans default-lazy-init="false" default-autowire="no"
    default-dependency-check="none">
    </beans>
  6. Open the QuarkXPress Server Manager "web.xml" file and update contextConfigLocation and listener-class as follows:

    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
    <listener>
    <listener-class>CustomContextLoaderListener</listener-class>
    </listener>
  7. If the existing application is already using Spring’s PropertyPlaceholderConfigurer, open "ManagerContainerConfig.xml" and specify the parent in the  placeholderConfig bean as follows:

    <bean id=" placeholderConfig " parent="placeholderConfig"
    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">