mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2 to HEAD
7633: Fixed compilation fallout from PropertyValue changes 7640: Build Fix - missing purges for some stores 7645: Fixed line endings 7646: Tweaks to MySQL QName upgrade script after doing large 1.4.3 to 2.2 upgrade. 7648: Give more time per thread to cater for slow executions of test threads 7649: Fixed QName query flush modes git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8440 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -428,6 +428,13 @@ public class AVMServicePermissionsTest extends TestCase
|
||||
finally
|
||||
{
|
||||
avmService.purgeStore(storeName);
|
||||
avmService.purgeStore(storeName + "-layer-base");
|
||||
avmService.purgeStore(storeName + "-layer-a");
|
||||
avmService.purgeStore(storeName + "-layer-b");
|
||||
avmService.purgeStore(storeName + "-layer-c");
|
||||
avmService.purgeStore(storeName + "-layer-d");
|
||||
avmService.purgeStore(storeName + "-layer-layer-base");
|
||||
avmService.purgeStore(storeName + "-layer-layer-layer-base");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,6 +596,13 @@ public class AVMServicePermissionsTest extends TestCase
|
||||
finally
|
||||
{
|
||||
avmService.purgeStore(storeName);
|
||||
avmService.purgeStore(storeName + "-layer-base");
|
||||
avmService.purgeStore(storeName + "-layer-a");
|
||||
avmService.purgeStore(storeName + "-layer-b");
|
||||
avmService.purgeStore(storeName + "-layer-c");
|
||||
avmService.purgeStore(storeName + "-layer-d");
|
||||
avmService.purgeStore(storeName + "-layer-layer-base");
|
||||
avmService.purgeStore(storeName + "-layer-layer-layer-base");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -742,6 +756,13 @@ public class AVMServicePermissionsTest extends TestCase
|
||||
finally
|
||||
{
|
||||
avmService.purgeStore(storeName);
|
||||
avmService.purgeStore(storeName + "-layer-base");
|
||||
avmService.purgeStore(storeName + "-layer-a");
|
||||
avmService.purgeStore(storeName + "-layer-b");
|
||||
avmService.purgeStore(storeName + "-layer-c");
|
||||
avmService.purgeStore(storeName + "-layer-d");
|
||||
avmService.purgeStore(storeName + "-layer-layer-base");
|
||||
avmService.purgeStore(storeName + "-layer-layer-layer-base");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1622,6 +1643,8 @@ public class AVMServicePermissionsTest extends TestCase
|
||||
finally
|
||||
{
|
||||
avmService.purgeStore(storeName);
|
||||
avmService.purgeStore(storeName+"-a-");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1988,6 +2011,7 @@ public class AVMServicePermissionsTest extends TestCase
|
||||
finally
|
||||
{
|
||||
avmService.purgeStore(storeName);
|
||||
avmService.purgeStore(storeName+"-a-");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2306,6 +2330,7 @@ public class AVMServicePermissionsTest extends TestCase
|
||||
finally
|
||||
{
|
||||
avmService.purgeStore(storeName);
|
||||
avmService.purgeStore(storeName+"-a-");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2383,6 +2408,7 @@ public class AVMServicePermissionsTest extends TestCase
|
||||
finally
|
||||
{
|
||||
avmService.purgeStore(storeName);
|
||||
avmService.purgeStore(storeName+"-a-");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -771,6 +771,14 @@ public class PropertyValue implements Cloneable, Serializable
|
||||
return actualType == null ? null : actualType.getOrdinalNumber();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the actual type's String representation
|
||||
*/
|
||||
public String getActualTypeString()
|
||||
{
|
||||
return actualType == null ? null : actualType.toString();
|
||||
}
|
||||
|
||||
public void setActualType(Integer actualType)
|
||||
{
|
||||
ValueType type = PropertyValue.valueTypesByOrdinalNumber.get(actualType);
|
||||
|
@@ -200,8 +200,8 @@ public class QNameDAOTest extends TestCase
|
||||
readyLatch.await(5, TimeUnit.SECONDS);
|
||||
// Let the threads go
|
||||
startLatch.countDown();
|
||||
// Wait for them all to be done (within limits)
|
||||
doneLatch.await(threadCount, TimeUnit.SECONDS);
|
||||
// Wait for them all to be done (within limit of 10 seconds per thread)
|
||||
doneLatch.await(threadCount * 10, TimeUnit.SECONDS);
|
||||
if (doneLatch.getCount() > 0)
|
||||
{
|
||||
fail("Still waiting for threads to finish");
|
||||
|
@@ -35,6 +35,8 @@ import org.alfresco.repo.domain.NamespaceEntity;
|
||||
import org.alfresco.repo.domain.QNameDAO;
|
||||
import org.alfresco.repo.domain.QNameEntity;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.Session;
|
||||
import org.springframework.orm.hibernate3.HibernateCallback;
|
||||
@@ -48,6 +50,8 @@ import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||
*/
|
||||
public class HibernateQNameDAOImpl extends HibernateDaoSupport implements QNameDAO
|
||||
{
|
||||
private static Log logger = LogFactory.getLog(HibernateQNameDAOImpl.class);
|
||||
|
||||
private static final String QUERY_GET_NS_BY_URI = "qname.GetNamespaceByUri";
|
||||
private static final String QUERY_GET_QNAME_BY_URI_AND_LOCALNAME = "qname.GetQNameByUriAndLocalName";
|
||||
|
||||
@@ -98,6 +102,10 @@ public class HibernateQNameDAOImpl extends HibernateDaoSupport implements QNameD
|
||||
|
||||
public NamespaceEntity newNamespaceEntity(String namespaceUri)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Persisting Namespace: " + namespaceUri);
|
||||
}
|
||||
NamespaceEntity namespace = new NamespaceEntityImpl();
|
||||
namespace.setUri(namespaceUri);
|
||||
// Persist
|
||||
@@ -186,6 +194,10 @@ public class HibernateQNameDAOImpl extends HibernateDaoSupport implements QNameD
|
||||
|
||||
public QNameEntity newQNameEntity(QName qname)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Persisting QName: " + qname);
|
||||
}
|
||||
final String namespaceUri = qname.getNamespaceURI();
|
||||
final String localName = qname.getLocalName();
|
||||
NamespaceEntity namespace = getNamespaceEntity(namespaceUri);
|
||||
|
@@ -59,7 +59,7 @@
|
||||
<version column="version" name="version" type="long" />
|
||||
</class>
|
||||
|
||||
<query name="qname.GetNamespaceByUri" flush-mode="never" cacheable="false">
|
||||
<query name="qname.GetNamespaceByUri" cacheable="false">
|
||||
select
|
||||
namespace
|
||||
from
|
||||
@@ -68,7 +68,7 @@
|
||||
namespace.uri = :namespaceUri
|
||||
</query>
|
||||
|
||||
<query name="qname.GetQNameByUriAndLocalName" flush-mode="never" cacheable="false">
|
||||
<query name="qname.GetQNameByUriAndLocalName" cacheable="false">
|
||||
select
|
||||
qname
|
||||
from
|
||||
|
Reference in New Issue
Block a user