mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.0 to HEAD
11899: (Recorded, skipped) Embedded agreed HeartBeat server URL http://hbrx.alfresco.com/hearbeat/ into repository HeartBeat client (recorded) 11900: (Recorded, skipped) Corrected typo in heartbeat URL (not hearbeat) 11901: (Recorded, skipped) Fix failing unit test by disabling shutdownBackstop 12164: (Recorded, partially skipped) Fix failing LicenseComponentTest. LicenseComponent was calling PersonService from an unauthenticated thread and this no longer works. 12165: (Recorded, skipped) Ensure License verify loop runs in authenticated thread. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12512 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -28,6 +28,8 @@ import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.service.descriptor.Descriptor;
|
||||
import org.alfresco.service.descriptor.DescriptorService;
|
||||
@@ -162,7 +164,7 @@ public class DescriptorServiceImpl extends AbstractLifecycleBean implements Desc
|
||||
{
|
||||
// initialise the repository descriptor
|
||||
// note: this requires that the repository schema has already been initialised
|
||||
RetryingTransactionCallback<Descriptor> createDescriptorWork = new RetryingTransactionCallback<Descriptor>()
|
||||
final RetryingTransactionCallback<Descriptor> createDescriptorWork = new RetryingTransactionCallback<Descriptor>()
|
||||
{
|
||||
public Descriptor execute()
|
||||
{
|
||||
@@ -181,8 +183,14 @@ public class DescriptorServiceImpl extends AbstractLifecycleBean implements Desc
|
||||
return installed == null ? new UnknownDescriptor() : installed;
|
||||
}
|
||||
};
|
||||
installedRepoDescriptor = transactionService.getRetryingTransactionHelper().doInTransaction(
|
||||
createDescriptorWork, transactionService.isReadOnly(), false);
|
||||
this.installedRepoDescriptor = AuthenticationUtil.runAs(new RunAsWork<Descriptor>()
|
||||
{
|
||||
public Descriptor doWork() throws Exception
|
||||
{
|
||||
return transactionService.getRetryingTransactionHelper().doInTransaction(createDescriptorWork,
|
||||
transactionService.isReadOnly(), false);
|
||||
}
|
||||
}, AuthenticationUtil.getSystemUserName());
|
||||
|
||||
((ApplicationContext)event.getSource()).publishEvent(new DescriptorServiceAvailableEvent(this));
|
||||
}
|
||||
|
Reference in New Issue
Block a user