O'Reilly logo

Expert Oracle and Java Security: Programming Secure Oracle Database Applications with Java by David Coffin

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

Method Syntax in Java Stored Procedures

I described the function of the modifier static in the main() method in Chapter 3. In Java stored procedures, we will see that Oracle database only calls static methods from Java stored procedures. This is for a similar reason to what we saw for the main() method: Oracle is calling these methods without instantiating an object of that class beforehand. We do not create an instance of MyApp4 (listing 4-1) before we call the getOracleTime() method. However, just as the main() method can instantiate itself or any other object, these static methods (like getOracleTime()) called as Java stored procedures can instantiate themselves or other objects as needed (not everything used in a static method is static). ...

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