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.