Setting Up the Environment

Developing with the User and Role API 25-13

25.3.6.5 Configuring a Custom Connection Pool Class

To use a custom connection pool, you must provide the fully qualified class name of the custom connection pool class, as follows: factEnv.putOIDIdentityStoreFactory.ST_CONNECTION_POOL_CLASS, oracle.security.idm.providers.stdldap.JNDIPool; For related information, see Section L.6, Failure to Connect to the Embedded LDAP Authenticator.

25.3.7 Configuring the Provider when Creating a Store Instance

The IdentityStore configuration affects the store object and all objects that are created using this store instance. A configuration parameter commonly used with the store is ST_SUBSCRIBER_NAME, which is the only start-time property accepted here. All the runtime properties can be supplied during identity store creation. Continuing with the earlier example in Section 25.3.6, Configuring the Provider when Creating a Factory Instance which created a factory instance, this code creates a handle instance to the store. IdentityStore oidStore = null; Hashtable storeEnv = new Hashtable; Creating the store instance storeEnv.putOIDIdentityStoreFactory.ST_SUBSCRIBER_NAME, dc=us,dc=oracle,dc=com; oidStore = oidFactory.getIdentityStoreInstancestoreEnv;

25.3.8 Runtime Configuration

Earlier, in Section 25.3.6, Configuring the Provider when Creating a Factory Instance and Section 25.3.7, Configuring the Provider when Creating a Store Instance , we demonstrated how to perform configuration when creating an instance. To facilitate adding and modifying properties at runtime, the User and Role APIs also provide a Configuration class. The Configuration instance can be obtained from the store instance using the IdentityStore.getStoreConfiguration API call. Properties can be modified using the configuration object. Only runtime properties can be modified using this approach, and the effect is visible only at runtime. This example sets the RT_USER_SEARCH_BASES property: StoreConfiguration conf = oidStore.getStoreConfiguration; conf.setProperty“RT_USER_SEARCH_BASES”, “dc=us,dc=oracle,dc=com”;

25.3.9 Programming Considerations

This section contains tips for working with providers and provider artifacts. Note: Directories require that you supply a valid subscriber name. For Oracle Internet Directory, you can supply the STsubscriber name as either a proper DN or as the nickname of the realm.