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). ...

Get Expert Oracle and Java Security: Programming Secure Oracle Database Applications with Java now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.