The client program must import the package containing the Java interfaces for the Application Module. It will also typically import the oracle.jbo.* package. For example:
import package4.common.*
// includes package4.common.HrAppmoduleimport oracle.jbo.*
// includes generic Application Module oracle.jbo.ApplicationModule
To use the exported method:
Get an instance of the Application Module and cast it to the exported Application Module.
Work with the exported method.
For example:
// look up factory for the custom application module
ApplicationModuleHome home = (ApplicationModuleHome)
ic.lookup("package4.HrAppmodule");// Call create() to get the application module instance;
// cast it to the custom application module
HrAppmodule hrAm = (HrAppmodule) home.create();//
// Create the transaction code here.
//// Call the Application Module exported method
hrAm.promoteAllEmps();