Tuesday, February 16, 2010

Configuring LDAP Cache

You have configured your SOA Suite with OID.

When you will log in to worklist console (http://host:port/integration/worklistapp )with user jcooper you will find there are two tabs present.However when you will log in to the worklist console with oc4jadmin as user you will find 6 tabs there this is because oc4jadmin is a member of BPMSystemAdmin.So you need to add the user jcooper in your BPMSystemAdmin as below.



for more information on configuring oid and adding user you can refer to my earlier posts configuring OID with BPEL.

Once you will do that you need to restart the SOA Suite for the changes to be implemented however in production issues we can not shutdwon our SOA Suite so frequently.Also if we will wait then we might have to wait for more than an hour for the jcooper user to show all the 6 tags.

so this will be an un necessary delay.To avoid this we can configure ldap cache.I am not sure of the different properties as no where i found the exact definition for all the properties but the following settings worked for me.


GO to your SOA_HOME/j2ee/oc4j_soa/config/jazn.xml

there in add ldap cache properties

<property name="ldap.cache.policy.enable" value="true" />
<property name="ldap.cache.realm.enable" value="true" />
<property name="ldap.cache.session.enable" value="true" />
<property name="ldap.cache.initial.capacity" value="20" />
<property name="ldap.cache.load.factor" value="0.7" />
<property name="ldap.cache.purge.initial.delay" value="600" />
<property name="ldap.cache.purge.timeout" value="600" />


so my jazn should now look something like this.

<jazn
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/jazn-10_0.xsd"
schema-major-version="10"
schema-minor-version="0"
provider="LDAP"
location="ldap://arahi-pc2.abc.com:389"
default-realm="abc">
<!-- properties to configure LDAP-->
<property name="ldap.cache.policy.enable" value="true" />
<property name="ldap.cache.realm.enable" value="true" />
<property name="ldap.cache.session.enable" value="true" />
<property name="ldap.cache.initial.capacity" value="20" />
<property name="ldap.cache.load.factor" value="0.7" />
<property name="ldap.cache.purge.initial.delay" value="600" />
<property name="ldap.cache.purge.timeout" value="600" />


</jazn>


So once these changes are done just restart the SOA suite and now you just try to log in to worklist console again with wfaulk you can see 3 tabs .Add wfaulk to BPMSystemAdmin and you can now within fraction of second if will login to worklist console again will be able to see all the 6 tabs.

The different ldap cache properties are


1>ldap.cache.policy.enable

If set to true, enables policy cache; if set to false, disables cache.

By default it is set to true

2>ldap.cache.realm.enable

If set to true, enables realm cache; if set to false, disables cache.

By default it is set to true.

3>ldap.cache.session.enable

If set to true, enables session cache; if set to false, disables cache.

By default it is set to true.

4>ldap.cache.initial.capacity

Initial capacity for the hashmap. This property affects performance; it is important to not set it too low.

Default value is 20

5>ldap.cache.load.factor

Load factor for the hashmap. This is a measure of how full to allow the cache to get before the capacity is automatically increased. This property affects performance; it is important to not set it too high.

Default value is 0.7

6>ldap.cache.purge.initial.delay

String containing an integer that represents the number of milliseconds the daemon thread waits before it starts checking for expired objects.

Set it to 10 minute

7>ldap.cache.purge.timeout

String representation of an integer that represents the number of milliseconds an object remains in cache before being invalidated and removed. It is also the sleep time for the daemon thread between each run looking for expired objects.

Set it to 10 minutes

No comments: