How to force ldap synchronization

I have a role in My webMethods portal that is defined by LDAP Query Role Provider.
I have a user of my Active Directory that need to have urgently this role.
But my problem is that LDAP sincronization that apply the role to this user takes more than 15 minutes to apply.
In ldap configuration I have:
[b]- cache capacity = 1000

  • cache timeout = 1 minute
  • search timeout = 60[/b]

I have to reconfigure this parameters to apply the query role providers more quickly?

Thanks.

Alejandro:

Make a java service to clear the role cache.


ICacheManager cacheManager = (ICacheManager) PortalSystem.getComponentProvider(IComponentNames.CACHE);
RoleCache roleCache = (RoleCache)cacheManager.getCache(com.webmethods.portal.service.cache.impl.RoleCache.ROLE_CACHE_NAME);
roleCache.flushAll(true);

Best regards.
Norberto.

And what “imports” I have to add?
I can’t locate the classes ICacheManager and RoleCache.
I have to copy any file to \SoftwareAG\IntegrationServer\lib\jars?

Alejandro:

Add the following imports:

java.util.Iterator
java.util.List
java.util.Map
com.webmethods.caf.faces.data.dir.IPrincipalProvider
com.webmethods.caf.faces.data.dir.PrincipalModelFactory
com.webmethods.portal.service.cache.ICacheManager
com.webmethods.portal.service.cache.impl.RoleCache
com.webmethods.portal.system.IComponentNames
com.webmethods.portal.system.PortalSystem
com.webmethods.sc.directory.DirectorySystemFactory
com.webmethods.sc.directory.IDirectoryGroup
com.webmethods.sc.directory.IDirectoryRole
com.webmethods.sc.directory.IDirectorySession

You don’t need to copy any jars to \lib.

Best Regards.
Norberto.

I can import this classes:
java.util.Iterator
java.util.List
java.util.Map
, but don’t locate the following namespace (the classes cannot be resolved):
com.webmethods.caf.*
com.webmethods.portal.*
com.webmethods.sc.*
I have WM 8.2.2.

Alejandro:

I’ve 8.0.1. You have to locate the appropriate jar/s and put them into IS common libraries path.

Regards.

I think, the code above should be executed in the context of MWS, not IS. I.e. you could create a portlet (or a web app) and create an action there which would execute the code. Then all the necessary libraries should already be in place (as they are available to all MWS components).

I can’t tell what will happen if you copy all the CAF libraries to the common dir. The code might compile, but will it work? The cache “lives” in MWS, so even if the call succeeds, I doubt it will bring the desired effect.

If you try it out please report back.

Yes, agree to the above.

MWS should provide a way to clear the LDAP Cache - why is it not there? Presumably instead you have to do a restart of the service - does this fix it?