mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
93965: Merged DEV to HEAD-BUG-FIX 93958: MNT-12770: Test failures on DB2 - Try to recreate property value one more time if DuplicateKeyException occurs. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@95017 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -407,6 +407,20 @@ public class PropertyValueDAOImpl extends AbstractPropertyValueDAOImpl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected PropertyValueEntity createPropertyValue(Serializable value)
|
protected PropertyValueEntity createPropertyValue(Serializable value)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return createPropertyValueInternal(value);
|
||||||
|
}
|
||||||
|
catch (DuplicateKeyException e )
|
||||||
|
{
|
||||||
|
//In very rare situation, it can fail. Just try one more time.
|
||||||
|
//See MNT-12770 for details
|
||||||
|
return createPropertyValueInternal(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private PropertyValueEntity createPropertyValueInternal(Serializable value)
|
||||||
{
|
{
|
||||||
// Get the actual type ID
|
// Get the actual type ID
|
||||||
Class<?> clazz = (value == null ? Object.class : value.getClass());
|
Class<?> clazz = (value == null ? Object.class : value.getClass());
|
||||||
|
Reference in New Issue
Block a user