# Calling Exported Application Module Methods

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.HrAppmodule

>     import oracle.jbo.*
>     // includes generic Application Module oracle.jbo.ApplicationModule

To use the exported method:

1. Get an instance of the Application Module and cast it to the exported Application Module.

2. 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();