I'm using a Java Stored procedure to do some processing in a Oracle 9i
database. The Java Stored Procedure takes several string parameters.
The Java Stored Procedure returns string data to the calling PL/SQL
Procedure.
I have the modifiable parameter mapped to a VARCHAR2. VARCHAR2 has a
size limit of 32767kb. The String datatype has no size limit and the
data that is collecting to return is getting quick large that it will
eventually exceed the limits of the VARCHAR2 datatype. What I want to
know is, is it possible to associate the String data type with a CLOB
in the declaration of the PL/SQL wrapper for the JSP? If so, how is
this done. My current attempts to use the CLOB or long have not been
successful.
example
procedure example1(varchar2, varchar2) as language java
name 'myclass.getData(String, String[])';
Java Stored Procedure
public class myclass {
getData(String p1, String[] p2) {
// do some stuff
p2[0] = "DATA";
}
What I would like to do is use a CLOB datatype instead of a varchar2
procedure example1(varchar2, clob) as language java
name 'myclass.getData(String, String[])';
My work around is to save the string data to a CLOB column in the JSP
and have the calling stored procedure retrive the value from the CLOB
column when it returns from the JSP.
Thanks in advance
Gerald
stevedhoward@gmail.com - 27 Apr 2006 20:40 GMT
Hi Gerald,
Is there any reason you can't use a java.sql.CLOB type and use the
getCharacter*Stream methods rather than a String array in the JSP?
That would be a clean mapping between PL/SQL and java.
Regards,
Steve
Gerald - 28 Apr 2006 16:01 GMT
I guess I neglected to try that since Oracle requires that a modifyable
parameter be set up as an array and I wasn't sure a data type
oracle.sql.Clob[] or java.sql.Clob[] would work.
I will try this .
Thanks
G-