Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Deferred processing

Alexander ChervinskyFeb 2 2019 — edited Feb 3 2019

Hi oracle community experts,

I have a question for which I haven’t found an answer yet.

I have a queue (AQ) of events to be processed, but I want the processing to be single-threaded, i.e. I want only one job running if there are events to process. And I want no jobs running if there are no events in the queue, so that I don’t spend server resources (sessions, job queue processes).

As far as I understand, event-based jobs don’t support this out of the box. They have parameter parallel_instances with the following description:

For event-based jobs only.

If TRUE, on the arrival of the specified event, the Scheduler creates a new lightweight job to handle that event, so multiple instances of the same event-based job can run in parallel.

If FALSE, then an event is discarded if it is raised while the job that handles it is already running,

It means that with parallel_instances=false I will miss events that come when the job is running. With parallel_instances=true I will have multiple instances of the same job running at the same time. I don’t want to miss events, and I want max one job running. Does anyone know a good solution for this?

It is needed for deferred processing, so that we don’t spend writers’ time on processing, and return control to them as soon as possible, guaranteeing that subsequent processing will happen. I need something like job_queue_processes, only not global, but for a single job.

upd: I found dbms_scheduler.create_resource procedure, but unfortunately I will not be able to use it, because it appeared it oracle 12.2, and we have only 11.2 and 12.1.

upd2: dbms_scheduler.set_resource_constraint exists in 12.1 documentation, it seems I’m on the right path, now I need to figure out how to use it without create_resource

upd3: there is no dbms_scheduler.set_resource_constraint in 12.1, so it looks like I found a documentation bug.

Comments

fac586
Answer

Hi Scott
The checkboxes are a feature that is enabled when Page Designer is used on a device with a touch-based UI. This is therefore likely to be related to the switch to iPad emulation. Check that all of the relevant browser options have been reset, but you may need to shut down the entire browser session and clear the site data.

Marked as Answer by Scott Wesley · Sep 6 2021
Scott Wesley

That makes sense, thanks.
I couldn't find a relevant setting, but a restart of the browser did the job.

McRivers

Just stumbled across this in 21.2. Thought I was going crazy "those checkboxes haven't 'always' been there, right?" i was saying to myself. ;)
@fac586 appreciate the solution...

Scott Wesley

Based on information from Magaly Iraheta on Twitter, and combining that with what I new I did, I can now recreate and “fix ”this on demand, with no need for browser restart.

If you enable mobile emulation (toggle device toolbar) with the developer tools, then click anywhere in the application builder, the key APEX.userHasTouched appears in Application-Session Storage.

On refresh of the builder page, these checkboxes will appear.

If you delete this key, then refresh the page, the checkboxes will no longer be present.

Thanks again, Magaly.

1 - 4

Post Details

Added on Feb 2 2019
1 comment
329 views