mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
68202: Merged PLATFORM1 (4.3/Cloud) to HEAD-BUG-FIX (4.3/Cloud) 65477: ACE-525 - BM-0013: SOAK: v420b214_01: DescriptorService intercepts retrying exception during concurrent start git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@68465 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -300,34 +300,15 @@ public class DescriptorServiceImpl extends AbstractLifecycleBean
|
|||||||
// Now listen for future license changes
|
// Now listen for future license changes
|
||||||
licenseService.registerOnLicenseChange(this);
|
licenseService.registerOnLicenseChange(this);
|
||||||
|
|
||||||
// load the license
|
try
|
||||||
RetryingTransactionCallback<Void> loadLicenseCallback = new RetryingTransactionCallback<Void>()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public Void execute() throws Throwable
|
|
||||||
{
|
{
|
||||||
// Verify license has side effect of loading any new licenses
|
// Verify license has side effect of loading any new licenses
|
||||||
licenseService.verifyLicense();
|
licenseService.verifyLicense();
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
};
|
catch (LicenseException e)
|
||||||
try
|
|
||||||
{
|
|
||||||
helper.doInTransaction(loadLicenseCallback, false, false);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
{
|
||||||
// Swallow Licence Exception Here
|
// Swallow Licence Exception Here
|
||||||
if (ExceptionStackUtil.getCause(e, LicenseException.class) != null)
|
|
||||||
{
|
|
||||||
// We found a LicenseException in the bowels
|
|
||||||
// Don't log error: It'll be reported by other means
|
// Don't log error: It'll be reported by other means
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// The error here is something else unforeseen
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -405,7 +386,19 @@ public class DescriptorServiceImpl extends AbstractLifecycleBean
|
|||||||
{
|
{
|
||||||
if (currentRepoDescriptor == null)
|
if (currentRepoDescriptor == null)
|
||||||
{
|
{
|
||||||
|
final RetryingTransactionHelper txnHelper = transactionService.getRetryingTransactionHelper();
|
||||||
|
|
||||||
|
RetryingTransactionCallback<Void> nopLoadLicense = new RetryingTransactionCallback<Void>()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public Void execute()
|
||||||
|
{
|
||||||
currentRepoDescriptor = currentRepoDescriptorDAO.updateDescriptor(serverDescriptor, LicenseMode.UNKNOWN);
|
currentRepoDescriptor = currentRepoDescriptorDAO.updateDescriptor(serverDescriptor, LicenseMode.UNKNOWN);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
txnHelper.doInTransaction(nopLoadLicense, false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -736,8 +729,6 @@ public class DescriptorServiceImpl extends AbstractLifecycleBean
|
|||||||
};
|
};
|
||||||
RetryingTransactionHelper txnHelper = transactionService.getRetryingTransactionHelper();
|
RetryingTransactionHelper txnHelper = transactionService.getRetryingTransactionHelper();
|
||||||
txnHelper.setForceWritable(true);
|
txnHelper.setForceWritable(true);
|
||||||
// ALF-19629 - Need to sort out trnsaction retry and do we need to Job Lock?
|
|
||||||
//txnHelper.doInTransaction(updateLicenseCallback, false, true);
|
|
||||||
txnHelper.doInTransaction(updateLicenseCallback);
|
txnHelper.doInTransaction(updateLicenseCallback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -756,9 +747,19 @@ public class DescriptorServiceImpl extends AbstractLifecycleBean
|
|||||||
// Make sure that the repo descriptor is updated the first time
|
// Make sure that the repo descriptor is updated the first time
|
||||||
if (currentRepoDescriptor == null)
|
if (currentRepoDescriptor == null)
|
||||||
{
|
{
|
||||||
currentRepoDescriptor = currentRepoDescriptorDAO.updateDescriptor(
|
final RetryingTransactionHelper txnHelper = transactionService.getRetryingTransactionHelper();
|
||||||
serverDescriptor,
|
RetryingTransactionCallback<Void> nopLoadLicense = new RetryingTransactionCallback<Void>()
|
||||||
LicenseMode.UNKNOWN);
|
{
|
||||||
|
@Override
|
||||||
|
public Void execute()
|
||||||
|
{
|
||||||
|
currentRepoDescriptor = currentRepoDescriptorDAO.updateDescriptor(serverDescriptor, LicenseMode.UNKNOWN);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
txnHelper.setForceWritable(true);
|
||||||
|
txnHelper.doInTransaction(nopLoadLicense, false, false);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user