NonStop Server for Java 7.0 Programmer's Reference
printers, see Spooler FASTP Network Print Processes Manual. For information on the Spooler
subsystem, see Spooler Utilities Reference Manual.
All printing features and attributes in the JPS classes listed below work when the NonStop spooler
and printer support the API. However, the NonStop operating system requirement for sending text
and postscript files to separate printers also applies when printing in JPS. The following are the
JPS classes:
• javax.print
• javax.print.attribute
• javax.print.attribute.standard
• javax.print.event
For applications using the java.awt.print.PrinterJob class, the printer must be postscript
enabled. For information on enabling postscript printing, see Spooler FASTP Network Print Processes
Manual.
Using the Guardian printer
NonStop Java API accepts the Guardian printer filenames.
The following code fragment shows how to set the Guardian printer filename and print the
print.txt file:
..
String printer = "$s.#p255";
FileInputStream stream = new FileInputStream("print.txt"); // file to print
..
PrintServiceAttributeSet prAttr = new HashPrintServiceAttributeSet();
prAttr.add(new PrinterName(printer, null));
PrintServiceLookup lookup = new UnixPrintServiceLookup();
PrintService[] services = null;
..
services = lookup.getPrintServices(null, prAttr);
..
DocPrintJob job = services[0].createPrintJob();
SimpleDoc doc = new SimpleDoc(stream, DocFlavor.INPUT_STREAM.AUTOSENSE, null);
..
job.print(doc, null);
..
..
NOTE: In the above example, $s.#p255 is the name of the configured printer. If there is no
printer configured with this name, then print output is routed to Spooler with location #p255. To
print the document, you need to explicitly reroute the document to the configured printer location.
For more information, see Spooler Utilities Reference Manual.
Dynamic saveabend file creation
NOTE: Dynamic saveabend file creation works only with Java processes. It will not work with
GC processes.
Dynamic saveabend file creation helps to create a saveabend file of a running Java process
without aborting (abending) the Java process, and by issuing a signal to the process. This allows
the Java process to continue execution even after the abend file is created. The time taken to create
the abend file, that is the application pause time is low (measurable in milliseconds).
The saveabend file enables you to analyze any observed Java runtime problems, such as observed
high memory consumption, and low responsiveness without impacting the running Java process.
To create a saveabend file in the working directory of the process, perform the following steps:
Using the Guardian printer 45










