Neoview Guide to Stored Procedures in Java (R2.5)
c. Package the SPJ class file in a JAR file:
jar cvf Payroll.jar Payroll.class
If the SPJ class refers to other classes, package the other classes in the same JAR file as
the SPJ class:
jar cvf Payroll.jar Payroll.class other.class
For details, see Chapter 3 (page 23).
3. Upload the SPJ JAR file from the client workstation to the Neoview platform. For details,
see Chapter 4 (page 33).
4. As the schema owner, create the SPJ in the Neoview database. For details, see Chapter 5
(page 37).
5. Grant privileges to roles for executing the SPJ and for operating on the referenced database
objects. For example, you can issue GRANT statements in an NCI session, as shown below:
GRANT EXECUTE
ON PROCEDURE persnl.adjustsalary
TO "ROLE.PAYROLLA", "ROLE.PAYROLLB"
WITH GRANT OPTION;
GRANT SELECT, UPDATE (salary)
ON TABLE persnl.employee
TO "ROLE.PAYROLLA", "ROLE.PAYROLLB"
WITH GRANT OPTION;
For details, see Chapter 6 (page 47).
6. Execute an SPJ by using a CALL statement in a client application. For example, you can
issue a CALL statement in an NCI session, as shown below, or in a JDBC or ODBC client
application:
SQL>call persnl.adjustsalary(29, 2.5, ?);
NEWSALARY
------------
139400.00
--- SQL operation complete.
For details, see Chapter 7 (page 51).
7. Monitor the performance of SPJs and resolve common problems with SPJs in a Neoview
database. See Chapter 8 (page 61).
20 Introduction