To specify the name of a Java shared-object file, specify the name of the static Java method to which the UDR corresponds and the location of the Java binary that defines the method.
Java Shared-Object File: .------------------. (1) V | |--quote--| Jar Name |-------:----+--------------+-+------------> '-package_id .-' >--class_id . method_id-----------------------------------------> >--+---------------------------------------------+--quote-------| | .-,-------------. | | V | | '-(----+-----------+-+--)--RETURNS--java_type-' '-java_type-'
Before you can create a UDR written in the Java language, you must assign a jar identifier to the external jar file with the sqlj.install_jar procedure. (For more information, see sqlj.install_jar.) You can include the Java signature of the method that implements the UDR in the shared-object filename.
It maps SQL data types to the corresponding Java data types with the JDBC and SQL-to-Java mappings. For information on mapping user-defined data types to Java data types, see sqlj.setUDTextName.
For example, if the Java method explosiveReaction( ) implements the Java UDR sql_explosive_reaction( ) as discussed in sqlj.install_jar, its shared-object filename could be:
course_jar:Chemistry.explosiveReaction
The preceding shared-object filename provides an implicit Java signature. The following shared-object filename is the equivalent with an explicit Java signature:
course_jar:Chemistry.explosiveReaction(int)Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]