felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Created: (FELIX-599) Service Registration Lock: Do not release not-owned lock and don't wait so long for the lock
Date Fri, 06 Jun 2008 13:11:44 GMT
Service Registration Lock: Do not release not-owned lock and don't wait so long for the lock
--------------------------------------------------------------------------------------------

                 Key: FELIX-599
                 URL: https://issues.apache.org/jira/browse/FELIX-599
             Project: Felix
          Issue Type: Bug
          Components: Declarative Services (SCR)
    Affects Versions: scr-1.0.1
            Reporter: Felix Meschberger
            Assignee: Felix Meschberger
             Fix For: scr-1.0.1


While fixing a asynchronicity issue in the AbstractComponentManager class, I introduced a
locking mechanism for the service registration field. This implementation has two issues:

(1) The unlockServiceRegistration lock simply releases the lock regardless of who is calling
the method. This causes wrong threads to be able to release the lock of other threads. A secondary
to this issue is, that the unlockServiceRegistration method is called by the getServiceReference()
and unregisterComponentService methods, regardless of whether the lock could be acquired or
not.

(2) When trying to acquire the lock, the lockServiceRegistration method tries to acquire the
lock and if not possible waits for 10 * 10 seconds (at most) until giving up. This is probably
too much. If the lock cannot be acquired within a short time frame, chances are, the lock
will never be acquirable. Therefore, this time frame is cut down to 10 * 1 second before failing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message