The procedure for updating custom-defined functions depends on these conditions:
Typically, to update a custom-defined function, you must replace the .jar file that contains the code for the function, and then re-register the function. If, however, the signature of the custom-defined function has not changed, and the function has only one set of input parameters (it is not an overloaded method), you can replace the .jar file that contains the function.
Note: | Only DBAs should update global custom-defined functions. |
To update a custom-defined function:
Make the changes to the Java class for the custom-defined function and use Java test programs to test its output.
Compile the Java classes and archive them in a new .jar file, using the same name as the previous .jar file.
Include any other classes and methods for custom-defined functions that were included in the previous .jar file.
Perform an action, depending on whether you are updating a local or global custom-defined function:
Local: Shut down any Essbase applications that use the functions in the .jar file.
Global: Shut down all Essbase applications
If you are unsure which Essbase applications use which functions in the .jar file, shut down all Essbase applications.
Copy the new .jar file to Essbase Server, replacing the existing .jar file with the same name.
If the signature of the custom-defined function has not changed, skip to step 8.
To replace the custom-defined function, use a tool:
Administration Services: See “Editing Custom-Defined Functions” in the Oracle Essbase Administration Services Online Help.
MaxL: Use the create or replace function statement. For example:
Local:
create or replace function sample.'@JSUM' as 'CalcFunc.sum';
Global:
create or replace function '@JSUM' as 'CalcFunc.sum';
Restart the applications that you shut down, which updates the catalog.