Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.jbo
Interface ConnectionModeConstants

public interface ConnectionModeConstants

Defines connection modes.

Various connection modes can be used by clients to find the root Application Module deployed using the Visigenic ORB. The modes that can be used are:

- `LOCAL` Deprecated: Use `JboContext` instead.

- `COLOCATE` In this mode, the VisiBroker ORB runs in the client. This mode is particularly useful for debugging.

- `REMOTE` Also known as "naming service" mode. In this mode, the application tier finds the server using the Visibroker naming service

- `USE_IOR` The IOR is a string that the gatekeeper displays when it is invoked. The gatekeeper IOR is used when you are running the application module as an applet.

- `USE_BIND` In this mode, you provide the name of the host where the VisiBroker server is running.

This class and its modes are typically used to set the environment for loading an Application Module on the Visibroker platform. See the following examples.

### Setting the Environment for the Remote (Naming Service) Mode

     // Component deployed to Visibroker connecting in Naming Service mode
        public static void setRemoteVbEnv()  {
           env.put(JboContext.INITIAL_CONTEXT_FACTORY,
                                JboContext.JBO_CONTEXT_FACTORY);
           env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_VB);
           env.put(JboContext.CONNECTION_MODE,
                                new Integer(ConnectionModeConstants.REMOTE));
           env.put(JboContext.APPLICATION_PATH, "RemoteAlias");
        }

where the `RemoteAlias` is the named service which is aliased by using the `startNamingService.bat` file.

### Setting the Environment for the Use Binding Mode

     // Component deployed to Visibroker connecting in Use Binding mode
        public static void setBindVbEnv()  {
           env.put(JboContext.INITIAL_CONTEXT_FACTORY,
                                JboContext.JBO_CONTEXT_FACTORY);
           env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_VB);
           env.put(JboContext.CONNECTION_MODE,
                                new Integer(ConnectionModeConstants.USE_BIND));
           env.put(JboContext.HOST_NAME, hostName);
         }

### Setting the Environment for the Colocate Mode

     // Component deployed to Visibroker connecting in Colocate mode
        public static void setColocatedVbEnv()  {
           env.put(JboContext.INITIAL_CONTEXT_FACTORY,
                                  JboContext.JBO_CONTEXT_FACTORY);
           env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_VB);
           env.put(JboContext.CONNECTION_MODE,
                                  new Integer(ConnectionModeConstants.COLOCATE));

Since:
  JDeveloper 3.0
See Also:
  `JboContext`

Field Summary
`static int` | `COLOCATE` Indicates that client and server are executing in the same JVM.
`static int` | `LOCAL` Deprecated. Use `JboContext` instead.
`static int` | `REMOTE` Indicates that a naming service is to be used.
`static int` | `USE_BIND` Indicates that remote applets are to use BIND.
`static int` | `USE_IOR` Indicates that IOR is to be used.

Field Detail

### LOCAL

    public static final int LOCAL

  Deprecated. Use `JboContext` instead.

### COLOCATE

    public static final int COLOCATE

  Indicates that client and server are executing in the same JVM.

### REMOTE

    public static final int REMOTE

  Indicates that a naming service is to be used.

### USE_IOR

    public static final int USE_IOR

  Indicates that IOR is to be used.

### USE_BIND

    public static final int USE_BIND

  Indicates that remote applets are to use BIND.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Business Components
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD