![]() |
|
This section contains the following subsections:
BladeSmith adds comments to the code it generates. Each routine begins with a prologue that describes the purpose of the routine, its arguments, and its return value. Comments throughout the code describe variable declarations and the results of generated Java statements and routine calls.
In comments at the beginning and end of each generated routine, BladeSmith stores information it uses when regenerating source code. The prologue includes a routine ID. A comment at the end of the routine contains a calculated checksum.
Warning: Do not modify either of these comments; BladeSmith uses them to merge your edits into the regenerated code.
Logging and Error Handling
BladeSmith adds logging and error handling code throughout the generated source code.
You can add additional logging calls using the Log() method from the IfmxLog class. The Log() method calls the standard Java I/O package methods system.out.println() and system.err.println(). For more information on these methods, see the Informix JDBC Driver Programmer's Guide.
If the Java value object is used on the client, the Log() method writes the logging messages to the standard output. If the Java value object is used on the server, the Log() method writes the logging messages to the Java log file.
The Java log file is distinct from the main database server log file, online.log. The Java log file contains all logging and tracing messages specific to Java methods.
The Java log file is specified by the JVPLOG configuration parameter, which is set in the ONCONFIG file. By default, the Java log file is at the following location:
You can change the location of the Java log file by setting the JVPLOG configuration parameter; see Creating UDRs in Java.
You can use the Java log entries when you debug a Java method; see Debugging a DataBlade Module.
BladeSmith generates the following utility classes whose methods are included in other generated code: