Hello.
I have this function that recovers a java method:
CREATE OR REPLACE FUNCTION FERNANDO.EjecutarProcesoSOFERNANDO (param1 VARCHAR2, param2 VARCHAR2) return NUMBER
AS LANGUAGE JAVA name 'EjecutarProcesoSOFERNANDO.ejecuta(java.lang.String, java.lang.String) return java.lang.int';
The first parameter is a os command and the second is a file (that is parameter for the command). This function is called inside another pl/sql function.
For the command to be executed I need to give permissions with dbms_java.grant_permission to the command and to the file.
My problem is that if the permissions are not granted the function EjecutarProcesoSOFERNANDO does not raise any exception nor returns any errorcode.
I need to control this some way in order to know if the command has really been executed.
How can I do that? Must I control it from pl/sql (maybe checking some dictionary table)
or should the java method return this information (I have no idea how I could do that) ?
Thanks in advance.