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 [,...]]'
- jar_name
- 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.
- package_name
- [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.
- java_class_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.
- java_method_name
- The name of the Java method that is performed when this procedure executes.
- java_data_type
- [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.