Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPS-122688 Define it greedy/dynamic to be able to provide alternative implementation. #95393

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -42,6 +42,8 @@

import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;

/**
* Participates in every unauthenticated HTTP request to Liferay Portal.
Expand Down Expand Up @@ -186,11 +188,6 @@ protected void setConfigurationProvider(
_configurationProvider = configurationProvider;
}

@Reference(unbind = "-")
protected void setUserImporter(UserImporter userImporter) {
_userImporter = userImporter;
}

@Reference(unbind = "-")
protected void setUserLocalService(UserLocalService userLocalService) {
_userLocalService = userLocalService;
Expand All @@ -203,7 +200,12 @@ protected void setUserLocalService(UserLocalService userLocalService) {
@Reference
private Portal _portal;

private UserImporter _userImporter;
@Reference(
policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY
)
private volatile UserImporter _userImporter;

private UserLocalService _userLocalService;

}