Can anyone tell me any ideas of performance for Oracle 9i JVM?

I am using Oracle 9.0.1, which is shipped with a 1.2.1 JVM internal in DB. I created a java stored function and found that it is 10+ times slower, compare to Stardard Sun JVM (1.3.1).

The java stored function send a String to a Java remote application and receive a String from it.
A Socket object and its ObjectInputStream, ObjectOutputStream object are created only ONCE for reuse. After that, whenever the function is invoked, it just send a String (about 20 characters) and receive a String (2 characters)

I find the total CPU load (time * average CPU percentage) is 35s, and with that 35s, 10s is for the load of java function invokation itself.
On the other hand, if I call the function outside Oracle, the load is about 3s.