When you create an external procedure written in Java, the EXTERNAL NAME clause specification is slightly different than what you would specify for an external procedure written in C or C++. For Java external procedures, you must specify an external Java reference string that specifies the JAR file name, Java class name within the JAR, and the Java method name within the class to be invoked when the system executes the procedure in the following format.
'jar_name:[package_name.]java_class_name.java_method_name [java_data_type [,...]]'
- The registered name of the JAR file associated with the procedure that the system creates when you call the built-in external procedure SQLJ.Install_Jar.
- [Required if java_class_name and java_method_name are in external package, optional otherwise.] The name and path of the external method package that contains java_class_name and java_method_name.
- The name of the Java class contained within the JAR identified by jar_name that contains the Java method to execute for this procedure.
- The name of the Java method that is performed when this procedure executes.
- [Required if java_method_name is overloaded, optional otherwise.] Java data type of java_method_name. Specifies the signature of a particular overloaded implementation of a Java method.
- A Java data type can be either simple or object-mapped according to the parameter mapping rules described in Data Type Mapping Between SQL and Java.
- java_data_type names are case sensitive.