hi,

I want to call a java static method (i.e MyClass.myName('a'))through a PL/SQL function. To achieve this I've written a pl/sql wrapper to do the job. I've already successfully loaded the MyClass.java file into the database and compiled it to get the .class file. The code for the wrapper PL/SQL function is given below:
--------------------
create or replace function myName(s in varchar2) return varchar2 IS
LANGUAGE JAVA NAME 'MyClass.myName(java.lang.String) return java.lang.String';
---------------------
All's well till here. Things are working fine, PL/SQL is working fine too and I'm getting the correct output.

Now I want to change the return type of my java method (i.e MyClass.myName()) from String to 1) a java Object 2) a resultset .

If the return type is resultset then the resultset would contain the results from a SQL statement that I would get through SQLJ and want to return the whole of the resultset to the caller (PL/SQL function). How can I map my wrapper PL/SQL function with the static java method to return a resultset ??

On the otherhand if the return type is Object then I should be able to create an Object of any class and return that object to the caller. The Pl/Sql function should be able to return the object that the statc java method is returning.Is this possible ?


Thanks to all of you!

Paul