Neoview Guide to Stored Procedures in Java (R2.2)

Java Methods Callable From Neoview SQL
With support for SPJs, Java methods are callable from any client application that communicates
with the Neoview platform. For example, you can invoke the same SPJ method from JDBC client
applications and ODBC client applications. By using Neoview SQL to invoke Java methods, you
can extend the functionality of a Neoview database and share business logic among different
applications.
Figure 1-1 Different Applications Calling the Same SPJ
For more information, see Chapter 7 (page 63).
Common Packaging Technique
Different applications can invoke the same SPJ to perform a common business function. By
encapsulating business logic in an SPJ, you can maintain consistent database operations and
avoid duplicating code in applications.
Applications that call SPJs are not required to know the structure of the database tables that the
SPJ methods access. The application does not need to use any table or column names; it needs
only the name of the stored procedure in the CALL statement. If the table structure changes, you
might need to change the SPJ methods but not necessarily the CALL statements within each
application.
Security
By using SPJs, you can conceal sensitive business logic inside SPJ methods instead of exposing
it in client applications. You can also grant privileges to execute an SPJ to specific user roles and
restrict the privileges of other roles. For more information, see Chapter 6 (page 51).
Increased Productivity
Use SPJs to reduce the time and cost of developing and maintaining client applications. By having
several applications call the same SPJ, you need only change the SPJ method once when business
rules or table structures change instead of changing every application that calls the SPJ.
Using the Java language to implement stored procedures increases development productivity.
Given the popularity of the Java language, you can leverage the existing skill set of Java
20 Introduction