Combination View Flat View Tree View
Threads [ Previous | Next ]
Michael Wall
Configuring LDAP Import lock duration
October 27, 2010 3:24 AM

Michael Wall

Rank: Junior Member

Posts: 56

Join Date: July 22, 2010

Recent Posts


I'm using Liferay 6 EE, with LDAP import scheduled every 60 mins, taking approx 30 mins.

If I stop and restart the app server (JBoss) while the import is in progress, the import is 'disabled' for 24 hours, until the lock (in the lock_) table expires / is removed. Fair enough.

I can delete the lock_ record while Liferay is not running before starting again, however my preference is to reduce the lock duration and let it expire.

Initially I tried adding the following to my (based on other properties):

After stopping, deleting the locks and restarting the new lock record still has a 24 hour duration so I looked at the code in PortalLDAPImporterImpl:

LockLocalServiceUtil.lock(defaultUserId, PortalLDAPImporterUtil.class.getName(), companyId, PortalLDAPImporterImpl.class.getName(), false, Time.DAY);

So lock duration is hardcoded to 24 hours, non configurable.

Is there any way to reduce the lock through configuration, or to have Liferay clear the lock_ table on shutdown / restart, other than waiting for the import to complete / using the Liferay Shurdown option.

I'm running in JBoss as a Windows Service using services.bat.

Vikash Pareek
RE: Configuring LDAP Import lock duration
January 3, 2013 11:10 PM

Vikash Pareek

Rank: New Member

Posts: 15

Join Date: December 10, 2012

Recent Posts

Hello Michael,
I have deleted all the user imported from ldap in liferay (by deactivating and then deleting).
But now i want to import those user again but i cant success.
connection with ldap server is ok with my ldap setting.
I have already enabled import on startup.
ldap server is having users also (i.e. non empty).
and deleted row (only one row avialable there) in lock_ table in database.
what am i missing for importing users.
please help me for this as soon as possible.
Rene van Reeuwijk
RE: Configuring LDAP Import lock duration
January 17, 2013 6:09 AM

Rene van Reeuwijk

Rank: New Member

Posts: 1

Join Date: January 17, 2013

Recent Posts

What helped me in the same situation was setting the loglevels to DEBUG for and
In the logfiles there were messages that Liferay still believed another ldap process was running.
After clearing all caches the import started to run again.

I have the following entries in

Regards Rene

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!