codemonth.dk

One project every month - making stuff better ...

Adding support for Edition Based Redefinition for PROMISES_NINJA

As part of another project, where I need to support the Edition Based Redefinition feature, I needed to add support inside the promise class for the dbms_scheduler job_class parameter. The job_class parameter can point to a service, and a service can be assigned a default edition to run in. This allows me to execute code inside a promise, and automatically support any edition that has been created in the database, as well as assigned to a service.

The job class of the promise code is defined, when you initiate the promise. Here is an example of a promise being defined with the V2_JOB_CLASS as the job class:


declare
test_promise promise;
begin
test_promise := promise('p_multiplier', 42, 'V2_JOB_CLASS');
promises_ninja.promise_wait(test_promise);
dbms_output.put_line('Value of promise is: ' || test_promise.getanyvalue);
end;
/

Tagged in : Advanced Queuing, DBMS_SCHEDULER, Object types, PL/SQL, sys.anydata