NonStop Server for Java 4.2 Programmer's Reference

SQLJ
Java applications that contain embedded SQL statements are known as SQLJ programs. SQLJ Part 0 is
part of the SQLJ standard that has been incorporated into the ANSI SQL-2002 standard. SQLJ supports
statically compiled SQL statements in addition to dynamically executed SQL statements in JDBC.
SQLJ is available only on TNS/R systems.
You can use SQLJ programs written to this standard as supported by NonStop SQL/MX. In SQL/MX, an
SQLJ program uses embedded SQL/MX statements to access an SQL/MP database and/or an SQL/MX
database.
For detailed information on using SQLJ, see the SQL/MX Programming Manual for Java in the NonStop
Technical Library.
Stored Procedures in Java
Stored procedures in Java (SPJs) provide an efficient and secure way to implement business logic in an
SQL/MX database. They allow you to write portable applications in Java and access an industry-standard
SQL database.
A SPJ is a type of user-defined routine (UDR) that operates within a database server. A UDR can be
either a stored procedure, which does not return a value directly to the caller, or a user-defined function,
which does return a value directly to the caller. (A stored procedure returns a value only to a host
variable or dynamic parameter in its parameter list.)
In the SQL/MX database, a SPJ is a Java method contained in a Java class, registered in SQL/MX, and
invoked by SQL/MX when an application issues a CALL statement to the method.
For detailed information on using SPJs, see the SQL/MX Guide to Stored Procedures in Java in the
NonStop Technical Library.
Title Page | Contents | Index | Glossary | Prev | Next
NonStop Server for Java Programmer's Reference (529774-002)
© 2010 Hewlett-Packard Development Company L.P. All rights reserved.