How to execute a PL/SQL stored procedure when starting an ADF application?
This topic is discussed already in few other blogs, where they addressed this scenario with phaseListener and Invoke Method of task flow.
Here I am addressing the same, calling a PLSQL procedure or some relevant methods that needs to called during the ADF application start up using AM method.
Application Module has a secure method called Create which gets called during the ADF Application start-up, so I overridden the method create in Application module.
Detail Steps below:
- Open the generated java class in the editor, and on the right mouse button popup menu on the source, select "Source" -> "Override Methods" , and select the "create" method.
- Inside the generated method body and below the super.create(); insert the code to call the stored procedure.
@Override
protected void create() {
System.out.println("Inside Application Module Create");
super.create();
}
During the ADF application start up - you can check the log for the message.