I am looking for some example Code how to use a Java-Stored Procedure with Out-Parameters. Don't get me wrong. I dont want to call a Procedure with Out Parameters from Java (there are a lot of examples for this out there) . I just want to implement the Call by Result concept in a Java-Stored Procedure. A Client will call this Procedure with some parameters and the Java Procedure will fill them. So my first question: is this possible? And my second Question: How to implement it?
I found out a solution. It is very simple.
Just defining the parameters as java array (e.g. String P1). The first value (P1) is the returned value.
At last just set in JDeveloper in the "Edit Method Signature" Dialog the parametermode to OUT.
The dialog can be found by rightclicking on the stored procedure in the dbexport file. You can read this
in Section 6 Publishing Java Classes With Call Specifications -> Setting Parameter Modes in
Oracle Database Java Developer's Guide.