O'Reilly logo

Applying and Extending Oracle Spatial by Siva Ravada, Simon Gerard Greener

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Java Stored Procedures

We saw with JTSVersion.getJTSVersion and getJVMProperty how easy it is to write a new PL/SQL function that executes a Java method within the JVM. These Java classes and methods are called Java Stored Procedures. As we have seen, creating an interface between PL/SQL and Java is easy. But it is important to note that:

  • Java Stored Procedures are by default executed with invokers rights
  • PL/SQL procedures are by default executed with definer's rights

When writing functions using Java classes and methods, one must comply with the following rules:

  • No constructor method is needed
  • Variables and methods must be declared [b]static[/b]
  • Use the default database connection (no user ID/password required: uses session connection)
  • Declare ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required