IDEMPIERE-5477 Concurrency issue for the use of OSGi Service Tracker (#1563)
This commit is contained in:
parent
f84ca70440
commit
c9f589c4d5
|
@ -37,8 +37,10 @@ public class DynamicServiceHolder<T> implements IServiceHolder<T>, IServicesHold
|
|||
*/
|
||||
public DynamicServiceHolder(ServiceTracker<T, T> tracker) {
|
||||
serviceTracker = tracker;
|
||||
if (serviceTracker.getTrackingCount() == -1)
|
||||
serviceTracker.open();
|
||||
synchronized (serviceTracker) {
|
||||
if (serviceTracker.getTrackingCount() == -1)
|
||||
serviceTracker.open();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue