I am looking for people who would have had experience.
I know what you are saying is theoratically correct, and to a certain extent practically be.
But I project a scenario here, and want to get some numbers, in this case. It sure means overhead of having java classes running in oracle, but how much load would it much, and how to measure the statistics of the same.
I have a code with lots of queries returning values.
query1 returns X
query2 returns Y, but it depends on X
query3 returns Z, but it depends on Y
Since running all the same in the code, would involve response from oracle to the application server, you have network data, so there would time gap in those two, since I could just have a java class perform the queries automically.
You should consider that the overhead of the JVM on Oracle is quite large, it is well documented already by Oracle. As I understand it, the JVM maintains state per session, this means that past the second user, the overhead is directly related to number of users - even before they issue their first query.
I think the answer you need is tucked away in some reading, not on here. Maybe I'm wrong (I'm getting used to it:-)) but I doubt anyone here can give you answers relating to performance on your servers on your project.
If you want my tuppence, run PL/SQL on the server, run Java on the client. Running Java on the server is like trying to run VMS on a VMS box running a PC emulator running a VMS emulator running a PC emulator. Technically great but a waste of time.
I would say the best way to decide is to benchmark it yourself as every system/app is different.
What Oracle recommend is that you stick with PLSQL for most database ops but there are some tasks which are very difficult and or inefficient in PLSQL but are very easy and fast in java. So if you are doing lots of compute intensive stuff rather than database DML then java might be better. BUT it also depends on how much CPU / network resources you have. If you have a high CPU load already then using the JVM might kill your performance anyway, also it might be better to run the java code on a different server but that also depends on your network bandwidth/latency between the two servers. So just having different hardware may be affect your choice of PLSQL or Java.