Database Embedded JVM (OJVM)

Database Embedded JVM (OJVM)

The embedded JVM runs Java code in user session (within the dedicated or shared server), in the same memory space as SQL and PL/SQL. These Java modules can be invoked by any database client, similarly to PL/SQL modules.

New Features in DB 18c and DB 19c

Cloud OJVM is available in Non-managed Database Cloud Services including DBCS, Database Service on OCI etc.
Java Standards Java 8 exclusively (Java 7 End of Public Updates was April 2015)
Zero Downtime during patching in RAC environments: for older releases, see MOS Note 2217053.1 for the conditional rolling patch
Web Services Callout (SOAP and REST):see Database Web Services
Performance JIT, memory manager (on-going infrastructure enhancements)
Debugger Integration with Java Debug Wire Protocol (JDWP)
Long Identifiers The maximum length of a SQL identifier is now 128 bytes.

Benefits and Use Cases

In-place processing of large datasets (batch operations, LOBs, JSON, XML) without incurring network traffic; In other words, no data shipping. Here are some use cases:

Micro services and/or Stored procedures/functions for in-place data processing using the server-side type 2 JDBC driver
Extending Oracle database with Java libraries e.g., SODA for Java, Hive client, and so on
JDBC Callout to non-Oracle RDBMS
  • using type 4 JDBC drivers from target RDBMS (SQL Server, DB2, Informix, Sybase, Adabas, etc)
  • using the Oracle JDBC type 4 for calling out another Oracle database or another session within the same database
Support JVM languages Scala, Jython, JRuby, Clojure, and Kotlin
Calling out to external Web Services (REST, SOAP) See the OJVMWCU utility in the doc
In-place indexing using Lucene and Solr  

Web Services Callout (SOAP & REST)

A new utility ´╗┐Oracle Web Services Callout Utility (OJVMWCU) which accepts WSDL (SOAP Web Services) as well as WADL (Restful Web Services) and additional parameters then retrieves the Web Services client proxy, loads it in the database and generates the wrapper for calling out the Web Service from SQL and PL/SQL.

For more details, see the related chapter and our DB 12.2 white paper What's in Oracle Database 12c Release 2 for Java & JavaScript Developers

Test Drive Oracle Database 19c in the Cloud

Have a Question? Socialize with Us