Internet Features   «Prev 

Java Virtual Machine used within Oracle Environment

There are numerous uses of Java beyond Oracle applications, and there are many features of the language that will not be used by most Oracle developers. The goal of this chapter is to provide developers who have a background in SQL and PL/SQL with an understanding of the Java language structures. This is not an exhaustive review of Java (there are numerous resources that accomplish that goal) but rather a short overview of the Java language components most commonly used by Oracle developers. Although there are many cases in which PL/SQL and Java correlate well to each other, there are significant differences in terminology and usage. That should not be surprising, since the two programming languages were developed independently.
Furthermore, PL/SQL's object-oriented capabilities were not part of its initial implementation, whereas Java has been object-oriented since its inception. To useJava effectively, you need to take a different approach than the one you may have taken in the past with PL/SQL.

Database Administration
Combine PL-SQL and Java, or substitute Java for PL-SQL within stored procedures, functions, triggers, object methods. You can use either programming language for these. You can even call PL/SQL subprograms from within Java subprograms or vice versa.

Connect the database with the native JDBC. When you create JDBC calls to query tables or perform DML commands, the connection used by Oracle's JVM is a high-performance connection to the database. This special connection is optimized for better performance than JDBC calls originating outside the database.

Take advantage of Oracle's scalability to service more concurrent users with less resources than ordinary JVMs. Most JVM products cannot share resources among concurrent users. Oracle's JVM uses the database's capability to share memory and reuse common code.