Parameter declaration in Java™ routines
must conform to the requirements of one of the supported parameter
styles.
The following two parameter styles are supported for Java routines:
- PARAMETER STYLE JAVA
- PARAMETER STYLE DB2GENERAL
It is strongly recommended that you specify the PARAMETER STYLE
JAVA clause in the routine CREATE statement. With PARAMETER STYLE
JAVA, a routine will use a parameter passing convention that conforms
to the Java language and SQLJ
Routines specification.
There are some Java routine
features that cannot be implemented or used with PARAMETER STYLE JAVA.
These are as follows:
- table functions
- scratchpads in functions
- access to the DBINFO structure in functions
- the ability to make a FINAL CALL (and a separate first call) to
a function or method
If you need to implement these features you can implement your
routine in C, or write it in Java,
using parameter style DB2GENERAL.
Aside from these specific cases, you should always create and implement
your Java routines using PARAMETER
STYLE JAVA.