Skip to Main Content

Java Development Tools

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!

Execute PL/SQL procedure Async from ADF

Juan Carlos MendozaMar 1 2017 — edited Mar 1 2017

I'm using ADF 12.2.1.2. My application has a functionality that needs to execute a pl/sql procedure. That process takes some minutes to complete and the application remains frozen until it finishes. I'm trying to improve the user expirience of this process maybe executing this process asyncronously and notifying the user when it finishes.

This is what I have tried so far:

                Thread t = new Thread(() -> {

                    MyAppModuleImpl myAM = (MyAppModuleImpl) Configuration.createRootApplicationModule("com.example.MyAppModule", "MyAppModuleLocalConfig");

                    myAM.executeLongProcess(myAM.getDBTransaction());

                    myAM.getDBTransaction().commit();

                    Configuration.releaseRootApplicationModule(myAM, true);

                    JboWarning msg = new JboWarning("finish");

                    msg.setSeverity(JboWarning.SEVERITY_INFORMATION);

                    throw msg;

                });

                t.setPriority(Thread.MAX_PRIORITY);

                t.start();

Doing it this way the process is lasting a lot more than what it did before.

Any sugestion of how could I implement this improvement?

Sorry about my english.

Thanks.

This post has been answered by Timo Hahn on Mar 1 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 29 2017
Added on Mar 1 2017
2 comments
432 views