Merged V3.0 to HEAD

11509: ETHREEOH-394: Incorrect message in activity feed when user accepts an invitation to a site
   11510: Fix to set position
   11511: Fix for ETHREEOH-533: Dialogs access via ExternalAccessServlet return to blank empty container.jsp page when Close button is clicked
   11512: Fix DM ACL deletion after merge forward for shared and defining ACLs.
   11513: Merged V2.2 to V3.0
      11501: Expose if set permissions are inherited or not and fix relatd behaviour for import/copy
   11514: Fix for ETHREEOH-476 (Impossible to create Site Invite Workflow) & ETHREEOH-254 (Default value at 'Start Advanced Workflow Wizard' page)
   11515: Fix for ETHREEOH-446 and ETHREEOH-447
   11517: Fix for ETHREEOH-225: Web Forms with repeating elements don't work
   11518: Merged V2.2 to V3.0
      11343: ACL upgrades may require a COW - it now warns when this happens.
      11369: Always lock against staging - ETWOTWO-763
   11519: Merged V2.2 to V3.0
      11467: Fixed ETWOTWO-774: CreateVersionTxnListener.afterCommit() throws NPE
      11468: More defensive coding on AVM txn listeners (avoid NPEs)
      11475: More defensive checks to avoid NPE
   11520: Merged V2.2 to V3.0
      11478: Keep creator and owner as orihinally set in AVM - Fix for ETWOTWO-604
   11521: RuntimeExec: Added optional directive SPLIT: to force argument tokenization
   11522: Limited tests to just check the command format not execute it for "dir . .."
   11523: Undid revision 11520 (Merged V2.2 11478)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12449 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2008-12-17 14:24:08 +00:00
parent 46483f1c54
commit 918e91fcfc
16 changed files with 340 additions and 93 deletions

View File

@@ -60,6 +60,8 @@ import org.springframework.context.ApplicationContextAware;
*/
public class AVMLockingAwareService implements AVMService, ApplicationContextAware
{
public static final String STORE_SEPARATOR = "--";
private AVMService fService;
private AVMLockingService fLockingService;
@@ -856,7 +858,11 @@ public class AVMLockingAwareService implements AVMService, ApplicationContextAwa
return null;
}
String dnsString = results.keySet().iterator().next().getLocalName();
return dnsString.substring(dnsString.lastIndexOf('.') + 1, dnsString.length());
String storeName = dnsString.substring(dnsString.lastIndexOf('.') + 1, dnsString.length());
final int index = storeName.indexOf(STORE_SEPARATOR);
return (index == -1
? storeName
: storeName.substring(0, index));
}
private void grabLock(String path)

View File

@@ -40,17 +40,20 @@ public class CreateStoreTxnListener extends TransactionListenerAdapter
public void afterCommit()
{
List<String> created = fCreatedStores.get();
for (String name : created)
if (created != null)
{
synchronized (this)
for (String name : created)
{
for (CreateStoreCallback cb : fCallbacks)
synchronized (this)
{
cb.storeCreated(name);
for (CreateStoreCallback cb : fCallbacks)
{
cb.storeCreated(name);
}
}
}
fCreatedStores.set(null);
}
fCreatedStores.set(null);
}
/* (non-Javadoc)

View File

@@ -41,17 +41,20 @@ public class CreateVersionTxnListener extends TransactionListenerAdapter
public void afterCommit()
{
List<Pair<String, Integer>> created = fCreatedVersions.get();
for (Pair<String, Integer> version : created)
if (created != null)
{
synchronized (this)
for (Pair<String, Integer> version : created)
{
for (CreateVersionCallback cb : fCallbacks)
synchronized (this)
{
cb.versionCreated(version.getFirst(), version.getSecond());
for (CreateVersionCallback cb : fCallbacks)
{
cb.versionCreated(version.getFirst(), version.getSecond());
}
}
}
fCreatedVersions.set(null);
}
fCreatedVersions.set(null);
}
/* (non-Javadoc)

View File

@@ -40,17 +40,20 @@ public class PurgeStoreTxnListener extends TransactionListenerAdapter
public void afterCommit()
{
List<String> created = fPurgedStores.get();
for (String name : created)
if (created != null)
{
synchronized (this)
for (String name : created)
{
for (PurgeStoreCallback cb : fCallbacks)
synchronized (this)
{
cb.storePurged(name);
for (PurgeStoreCallback cb : fCallbacks)
{
cb.storePurged(name);
}
}
}
fPurgedStores.set(null);
}
fPurgedStores.set(null);
}
/* (non-Javadoc)

View File

@@ -41,17 +41,20 @@ public class PurgeVersionTxnListener extends TransactionListenerAdapter
public void afterCommit()
{
List<Pair<String, Integer>> created = fPurgedVersions.get();
for (Pair<String, Integer> version : created)
if (created != null)
{
synchronized (this)
for (Pair<String, Integer> version : created)
{
for (PurgeVersionCallback cb : fCallbacks)
synchronized (this)
{
cb.versionPurged(version.getFirst(), version.getSecond());
for (PurgeVersionCallback cb : fCallbacks)
{
cb.versionPurged(version.getFirst(), version.getSecond());
}
}
}
fPurgedVersions.set(null);
}
fPurgedVersions.set(null);
}
/* (non-Javadoc)