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) orserver/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
To install QuarkXPress Server Manager:
-
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.
-
Double-click the Installer icon and follow the instructions on the screen.
-
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.)
-
Complete the installation.
Installing QuarkXPress Server Manager: Windows
To install QuarkXPress Server Manager:
-
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.
-
Double-click the Installer icon and follow the instructions on the screen.
-
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.
-
-
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).
To install QuarkXPress Server Manager in a shared Spring context:
-
Copy the
qxpsm
andqxpsmadmin
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 s
erverXmlFilePath
to the path of the "Server.xml" file relative to the current working directory.
-
-
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. -
Import the QuarkXPress Server Manager Spring context file, "ManagerContainerConfig.xml," into the existing application Spring context.
-
Create a Java class named
CustomContextLoaderListener
that extendsorg.springframework.web.context.ContextLoaderListener
. Override the methodloadParentContext()
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); } } }
-
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>
-
Open the QuarkXPress Server Manager "web.xml" file and update
contextConfigLocation
andlistener-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>
-
If the existing application is already using Spring’s
PropertyPlaceholderConfigurer
, open "ManagerContainerConfig.xml" and specify the parent in theplaceholderConfig
bean as follows:<bean id=" placeholderConfig " parent="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">