Skip to Main Content

Java and JavaScript in the Database

Why does it take so long to call Java class file from Oracle database?

user13083330Feb 25 2022

I have a ORACLE Function.

CREATE OR REPLACE FUNCTION F_LOADJAVA_TEST
(
I_USER_NM IN VARCHAR2
)
RETURN VARCHAR2
AS
LANGUAGE JAVA
NAME 'crypto.Test.test(java.lang.String) return java.lang.String';
/

And Java Method "test" is..
........................
1 : log.debug(":dec s 2");
2: Cipher cipher = Cipher.getInstance("AES");
3: log.debug(":dec s 3");
.........................

The time between steps 1 and 3 takes more than 6 seconds.
Not always. The first time takes longer, but the second time is faster as long as the session persists.
Give me a hint Please~!

Comments
Post Details
Added on Feb 25 2022
1 comment
69 views