Concurrent requests dependency?


I have a scenario where concurrent request A is submitted and a while later B. Now the catch is that B should run only once A is complete. Is there any means by which this can be achieved?
At present, what happens is that B gets done before A and hence A ends up retrieving incorrect data from the database.

Who is Participating?
Geert GOracle dbaCommented:
this is something which is in the design of the application
so you need to specify how the application does the processing
or post the code of handling the requests
you can wrap A and B in a single process C where C calls A then B.

If that isn't possible, you can use alerts, where A raises an alert  and B runs but waits for the alert.
or use dbms_pipes to communicate between them
or have A submit a dbms_job that invokes B , and then B will be queued but won't start until A commits
or use sockets to communicate
or use a dbms_job that polls the status of A by some means and when it detects A is done it starts B
Franck PachotCommented:
You can also use enqueues: A and B both lock the same resource.
That can be a row if it has a meaning , or you can use dbms_lock package.
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Mark GeerlingsDatabase AdministratorCommented:
Is this a generic Oracle question involving a custom application, or is this an Oracle Applications (or EBS) issue involving Concurrent Manager programs?  In EBS, you should be able to define the two jobs so only one cof the two can be running at a time.
Please accept one or  more of the answers above that best helped you.
If no indication from author then I recommend split


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.