Deploying to a JEE Application Server

The information in this section comes from notes taken while testing deployment of Mr. XML Publisher on each supported JEE server. Please do not attempt to deploy Mr. XML Publisher into a JEE server without appropriate experience or training. Carefully follow the application deployment instructions provided in your JEE server's documentation.

Some JEE servers do not automatically reload a web application's servlet context upon edit-save of the application's web.xml file. Thus, before deploying to a JEE server, you will want to configure and test your command arrays (and virtually everything in Mr. XML Publisher) using a web container that does reload the servlet context upon each edit-save of the web.xml file. Tomcat does that.

Each JEE server is different in what it requires for changes to web.xml to take affect. A JEE server might require that a web application be redeployed, or it might provide a mechanism to stop and restart the application. In the worst case, a JEE server might require a complete restart of itself before web.xml changes take affect. You are strongly encouraged to configure and test first in a modern, friendly web container, like Tomcat.

[Caution]Caution

If your JEE server includes its own database drivers or parser libraries, be mindful of the versions in use. Exceptions can occur when using older, incompatible drivers and parsers.

JBoss

These JBoss tips all relate to log file locations, log file formatting, and database driver versions.

  • With the default JBoss configuration, output from Mr. XML Publisher directed to System.out goes to both the console and the JBoss server.log file.

  • The jmimemagic.log file created by the Java Mime Magic library (from within Mr. XML Publisher), always appears in a directory and file relative to the JBoss bin directory. For example, when JBoss is installed at /usr/local/jboss-4.2.1.GA, the jmimemagic.log file appears at /usr/local/jboss-4.2.1.GA/bin/logs/jmimemagic.log.

  • Using installation defaults, the Mr. XML Publisher log file is created at ~/sever/default/log/XML_Publisher.html.

  • Using the default formatting specified in the jboss-log4j.xml file, the output for Mr. XML Publisher performance timing is formatted in a way that makes it almost unreadable. JBoss administrators can change that by editing the jboss-log4j.xml file and changing the specified formatting for messages sent to System.out.

  • Many JBoss servers have installed a mySQL driver. Mr. XML Publisher expects to use the mySQL driver installed by default in its lib directory. The version specification for that driver is "MySQL-AB JDBC Driver, Major Version 5, Minor Version 0, JDBC version: 3.0". If your JBoss server has an older mySQL driver installed, you might experience problems.

IBM WebSphere Application Server (WAS)

A few of these WAS tips may be essential if deploying or redeploying to WAS version 6.1.

  • With WAS version 6.1, Mr. XML Publisher's class files must be compiled to run specifically on a version 1.5 JVM.

  • WAS includes its own DB2 driver, thus you may need to pay special attention to DB2 driver versions. Mr. XML Publisher ships with the DB2 driver it expects in its lib directory. The version specification for that driver is "IBM DB2 JDBC Universal Driver Architecture, Major Version 3 Minor Version 1, JDBC version 3.0".

  • When deploying Mr. XML Publisher as a war file into WAS, the jar file (later to be renamed with a ".war" extension) must be jarred up from within the XML_Publisher directory. All other JEE app servers take a war file jarred up from directly outside the XML_Publisher directory.

  • In Mr. XML Publisher's web.xml file, the <param-value> for the log4j-init-file <context-param> cannot be "WEB-INF/log4j.properties". The value must begin with a "/", as in "/WEB-INF/log4j.properties". No other JEE app server required the "/".

  • All data pullers work well with WAS under all circumstances except when the following are true: 1) you are attempting to pull data from DB2 upon application stop-start from within the WAS admin console, 2) you have an old Oracle parser library included in Mr. XML Publisher's lib directory.

    If you are not pulling data from Oracle, just DB2, the fix is to simply remove the Oracle parser library from Mr. XML Publisher's lib directory. If you need to pull data from both Oracle and DB2, you must first manually edit the files in the META-INF/services directory within the Oracle driver's jar file (xmlparserv2.jar). Follow the instructions given for the caution included in <Oracle_Pull>.

  • Using installation defaults, the XML_Publisher.html log file is located in the ~\AppServer\profiles\AppSrv01\logs directory. Mr. XML Publisher messages sent to System.out go to the same file as Websphere's messages sent to System.out, the WAS SystemOut.log file.

BEA WebLogic Server

Several of these tips are probably essential for a successful deployment into BEA WebLogic Server.

  • With BEA WebLogic Server 10.0, Mr. XML Publisher's class files must be compiled to run specifically on a version 1.5 JVM.

  • Although you can deploy XML Publisher with BEA-specific config files, such as a plan.xml file, you can also deploy Mr. XML Publisher following BEA's instructions for deploying a web application from a directory, in which case no BEA-specific config files are necessary.

  • Using installation defaults, the XML_Publisher.html log file is created at ~/domains/wl_server/logs/XML_Publisher.html. The default BEA configuration causes many BEA log messages (messages not generated from within Mr. XML Publisher) to be sent to the XML_Publisher.html file. There is no harm in that. To change it, consult the BEA documentation or BEA technical support.

  • Using installation defaults, Mr. XML Publisher messages sent to System.out go to the BEA console.

  • BEA Weblogic Server does not, by default, detect errors in web.xml files. Thus, you may want to manually validate the Mr. XML Publisher web.xml file using the XML validation tool of your choice.

GlassFish / Sun Java System Application Server

Several of these tips are probably essential for a successful deployment into GlassFish / Sun Java System Application Server.

  • When deploying into GlassFish / Sun Java System Application Server 9.1, Mr. XML Publisher must be deployed unpacked, not as a .war file.

  • Using installation defaults, GlassFish / Sun Java System Application Server creates the XML_Publisher.html log file at ~/config/logs/XML_Publisher.html.

  • Using installation defaults, Mr. XML Publisher messages sent to System.out go to ~/domain1/logs/server/log. Consult your GlassFish / Sun Java System Application Server's documentation for instructions on how to format messages sent to that file. The default formatting makes them nearly unreadable.

  • GlassFish / Sun Java System Application Server does not, by default, detect errors in web.xml files. Thus you may want to manually validate the Mr. XML Publisher web.xml file using the XML validation tool of your choice.

Geronimo

The following tips apply to Geronimo whether the web container used within Geronimo is Tomcat or Jetty.

  • Using installation defaults, the XML_Publisher.html log file is created in the ~/<geronimo-home>/logs directory. If the logs directory does not exist, it will be created.

  • Using installation defaults, a peculiarity with Geronimo is that many log messages generated by Mr. XML Publisher's internal Java Mime Magic library are sent to the XML_Publisher.html log file. The jmimemagic log messages do not go to the XML_Publisher.html file in any other JEE server or web container. This is probably caused by a configuration conflict involving Geronimo's own commons-logging and/or log4j libraries. Mr. XML Publisher expects to use the log4j and commons-logging libraries in its ~/WEB-INF/lib directory.

  • Using installation defaults, Mr. XML Publisher messages sent to System.out go to the console.

  • Using installation defaults, some Geronimo log messages typically sent to System.out are sent to the XML_Publisher.html log file. This is probably caused by a configuration conflict involving Geronimo's own commons-logging and/or log4j libraries. Mr. XML Publisher expects to use the log4j and commons-logging libraries in its ~/WEB-INF/lib directory.