serious memory leak when executing java stored procedure
I use one simple example to test java stored procedure but i have met one serious problem. If it's not my fault, there exists serious bug of Oracle JVM. And the problem make it more like a toy.
(1) java program Test.java
public class Test {
public static void tst() {
}
}
(2) javac Test.java
(3) loadjava -user scott/tiger -oci8 -resolve -verbose Test.class
(4) create or replace procedure tst
AS LANGUAGE JAVA
NAME 'Test.tst()';
/
(5) test.sql
Begin
for loop_v in 1..100000000 loop
tst();
end loop;
end;
(7) execute the test.sql
sqlplus scott/tiger
>@test
(6) oracle version information:
oracle 8.1.7, Linux 2.4.2
(7) problem:
When the test.sql is executed , I use top tool to monitor the oracle process. I found the column SIZE value is gradually climbed. When reaching some point test.sql lose connection with oracle server. It always use out all the memory of Linux system.
If the test is correct, I think oracle java stored procedure is just like one toy.
zhu zhong hua