Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Other Syntax Segments > Shared-Object Filename >

Java Shared-Object File

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.

Read syntax diagramSkip visual syntax diagramJava Shared-Object File:
 
                                .------------------.
                       (1)      V                  |
|--quote--| Jar Name |-------:----+--------------+-+------------>
                                  '-package_id .-'
 
>--class_id . method_id----------------------------------------->
 
>--+---------------------------------------------+--quote-------|
   |    .-,-------------.                        |
   |    V               |                        |
   '-(----+-----------+-+--)--RETURNS--java_type-'
          '-java_type-'
 

Notes:
  1. See Jar Name

Element Description Restrictions Syntax
class_id Java class whose method implements the UDR Class must exist in the .jar file that Jar Name identifies Must conform to rules for Java identifiers
java_type Java data type for a parameter in the Java-method signature Must be defined in a JDBC class or by an SQL-to-Java mapping Must conform to rules for Java identifiers
method_id Name of the Java method that implements the UDR Must exist in the Java class that java_class_name specifies Must conform to rules for Java identifiers
package_id Name of package that contains the Java class Must exist Must conform to rules for Java identifiers
quote Single ( ' ) or double ( '' ) quotation mark delimiters Opening and closing quotation marks must match Literal symbol ( ' or '' ) entered at the keyboard

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.

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 ]