Chapter 6. Deploying SQLJ in the JServer

Oracle8i contains an integrated Java environment known as the JServer . The combination of the Oracle8i database and the JServer allows Java programs to be run from inside the database. This functionality completes the circle of PL/SQL and Java: you have seen that SQLJ programs can call PL/SQL, and now you can call Java methods from within PL/SQL and SQL. This ability to run Java from within the database means that stored procedures, functions, and triggers that previously had to be written using Oracle's proprietary PL/SQL language can now be written in SQLJ, which is an evolving industry standard language. In addition, the Oracle Internet Application Server, or iAS, also contains a JServer, which means you can deploy SQLJ programs in the middle tier as well as in the Oracle8i database.

In this chapter, you will learn about the JServer and how to design, deploy, and execute a SQLJ program to run in the JServer. You will learn how to use JDeveloper to deploy a SQLJ program to the JServer. You will examine an Enterprise JavaBeans example containing SQLJ statements, and learn how to deploy it to the JServer. The examples in this section use Version 8.1.6 of SQLJ and Oracle8i.

All the SQL DDL statements in this chapter are contained in the SQL*Plus script server_examples.sql. You should run this script if you wish to run the example programs contained in this chapter.

Get Java Programming with Oracle SQLJ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.