Neoview Guide to Stored Procedures in Java (R2.3, R2.4)

Exception Handling.........................................................................................................................32
Handling Java Exceptions.....................................................................................................................32
User-Defined Exceptions.................................................................................................................32
Compiling and Packaging Java Classes................................................................................................33
4 Deploying SPJ JAR Files on the Neoview Platform....................................................35
Uploading SPJ JAR Files to the Neoview Platform..............................................................................35
Downloading SPJ JAR Files to a Client Workstation............................................................................38
Renaming an SPJ JAR Files...................................................................................................................39
Deleting SPJ JAR Files From the Neoview Platform............................................................................41
5 Creating SPJs in a Neoview Database......................................................................43
Required Privileges for Creating an SPJ...............................................................................................43
Creating SPJs.........................................................................................................................................43
Displaying the SPJs in a Schema...........................................................................................................47
Using DB Admin to Display SPJs in a Schema................................................................................47
Using NCI to Display SPJs in a Schema..........................................................................................49
Dropping SPJs.......................................................................................................................................49
Altering an SPJ and Its Java Bytecode..................................................................................................50
6 Granting Privileges for Executing SPJs.......................................................................51
Granting Privileges on an SPJ...............................................................................................................51
Granting Privileges on Reference Database Objects.............................................................................52
Revoking Privileges on an SPJ..............................................................................................................52
Using Script Files to Grant and Revoke Privileges...............................................................................53
Script File for Granting Privileges...................................................................................................53
Script File for Revoking Privileges..................................................................................................54
Using DB Admin to Grant Privileges on SPJs......................................................................................54
Using DB Admin to Revoke Privileges on SPJs....................................................................................57
Showing Privileges on SPJs...................................................................................................................60
7 Executing SPJs..............................................................................................................63
Required Privileges for Calling an SPJ.................................................................................................63
Transaction Behavior............................................................................................................................63
Multithreading......................................................................................................................................64
Using the CALL Statement...................................................................................................................64
Specifying the Name of the SPJ.......................................................................................................64
Listing the Parameter Arguments of the SPJ...................................................................................64
Data Conversion of Parameter Arguments................................................................................64
Input Parameter Arguments......................................................................................................65
Output Parameter Arguments...................................................................................................65
Result Sets...................................................................................................................................66
Calling SPJs in NCI...............................................................................................................................66
Using Named Parameters................................................................................................................66
Using Unnamed Parameters............................................................................................................66
Returning Result Sets in NCI...........................................................................................................67
Calling SPJs From an ODBC Client Application..................................................................................68
Returning Result Sets in an ODBC Client Application...................................................................68
Calling SPJs From a JDBC Client Application......................................................................................69
Returning Result Sets in a JDBC Client Application.......................................................................69
Calling an SPJ in a Trigger....................................................................................................................70
4 Table of Contents