SQL/MX Guide to Stored Procedures in Java (G06.24+, H06.03+)

Performance and Troubleshooting
HP NonStop SQL/MX Guide to Stored Procedures in Java523727-004
7-2
Performance Tips
To identify Java-related errors, execute the SPJ method outside the database by
invoking the Java method directly in a Java application that you run on the
command line. For more information, see the NonStop Server for Java
Programmer’s Reference.
Performance Tips
To ensure the optimal performance of SPJs in NonStop SQL/MX:
Design your Java classes and directory structure so that fewer SPJ methods in
different external paths rely on the same application class. This approach
conserves system resources and memory. For more information, see Updating the
Java Class Files of a Referenced Application Class on page 1-18.
Use UDR_JAVA_OPTIONS settings to manage multiple SPJ environments to
support parallelism of CALL statements issued from a multithreaded application.
For more information, see Multithreading in an SPJ Environment on page 1-15.
Avoid using too many UDR_JAVA_OPTIONS settings in applications that call
SPJs. For more information, see Using Multiple UDR_JAVA_OPTIONS Settings in
One Application on page 2-15.
Avoid nesting CALL statements in an SPJ method, which wastes resources and
diminishes performance. For more information, see Nested Java Method
Invocations on page 3-5.
Use connection pooling and explicitly close each java.sql.Connection object
when it is no longer needed instead of relying on garbage collection. For more
information, see Use of java.sql.Connection Objects on page 3-5.