# Finding an Application Module Instance in Code

Remote clients use the JNDI context and lookup mechanism to find the Application Module server (`ApplicationModuleHome` interface) for creating root-level Application Modules. Pseudocode for finding an `ApplicationModuleHome` looks like this:

    Hashtable contextEnv = new Hashtable()
    contextEnv.put(JboContextProperty, Value)
    Context ic = new InitialContext(contextEnv);
    ApplicationModuleHome home = (ApplicationModuleHome) ic.lookup(AppModDefName);
    ApplicationModule am = home.create();

The following table describes the initial context parameters (`JboContextProperty` in the example above) that a client must pass to find the home interface

Context Property | Description | Required on Platforms
`DEPLOY_PLATFORM` | Platform to which an Application Module is deployed. One of `PLATFORM_VB`, `PLATFORM_LOCAL`, or `PLATFORM_ORACLE8I`. | ALL
`INITIAL_CONTEXT_FACTORY` | Must be `JBO_CONTEXT_FACTORY`. | ALL
`HOST_NAME` | Host on which the Application Module server is started. Required on Visibroker for `USE_BIND` mode only. | Oracle8i CORBA Server, Visibroker
`CONNECTION_PORT` | Port number where the ORB listens for IIOP requests | Oracle8i
`CONNECTION_MODE` | Specifies how to connect to Application Module server. Clients can connect to an Application Module server started on a remote host (`USE_BIND` mode), find the server using the Visibroker naming service (`REMOTE` mode), or load the server in the client's VM (`COLOCATED` mode). | Visibroker
`ORACLE_SID` | Oracle8i CORBA Server service ID to identify the ORB service. | Oracle8i
`APPLICATION_PATH` | JNDI path under which an Application Module is registered. Full path under which an Application Module is published. | Oracle8i
`USE_APPLET` | Must be used whenever the client is an applet. | Visibroker, Oracle8i CORBA Server
`SECURITY_PRINCIPAL` | User name. Required for connecting to an Oracle8i CORBA Server. | Oracle8i CORBA Server
`SECURITY_CREDENTIALS` | Password. Required for connecting to an Oracle8i CORBA Server. | Oracle8i CORBA Server