Skip Headers

# Acquiring a Client Session That Uses Connection Properties

Previous

Next

Example: Acquiring an Isolated Session Using Connection Properties illustrates how to configure a `ConnectionPolicy` and use it to acquire a client session that uses connection properties. In this example, the properties are used by the Oracle VPD feature (see "Isolated Client Sessions and Oracle Virtual Private Database (VPD)"). You can use connection properties for other application purposes.

Acquiring an Isolated Session Using Connection Properties

    ConnectionPolicy connectionPolicy = new ConnectionPolicy();
    // Set VPD specific properties to be used in the events
    connectionPolicy.setProperty("userLevel", new Integer(5));

    Session clientSession = server.acquireClientSession(connectionPolicy);

For more information, see "Configuring Connection Policy".