[356521] Deadlock occurring due to ModuleStructuralModel.checkSync() in 3.0.5 P
diff --git a/features/org.eclipse.wst.common_core.feature.patch/buildnotes_org.eclipse.wst.common_core.feature.patch.html b/features/org.eclipse.wst.common_core.feature.patch/buildnotes_org.eclipse.wst.common_core.feature.patch.html
index 510d6b1..cd17d80 100644
--- a/features/org.eclipse.wst.common_core.feature.patch/buildnotes_org.eclipse.wst.common_core.feature.patch.html
+++ b/features/org.eclipse.wst.common_core.feature.patch/buildnotes_org.eclipse.wst.common_core.feature.patch.html
@@ -46,5 +46,6 @@
 <p>Bug <a href='https://bugs.eclipse.org/329997'>329997</a>. JSP Syntax Validators show error markers even when the build based markers are turned off.</p>
 <p>Bug <a href='https://bugs.eclipse.org/351599'>351599</a>. ConcurrentModificationException on faceted project creation.</p>
 <p>Bug <a href='https://bugs.eclipse.org/277428'>277428</a>. Validation preferences not imported correctly</p>
+<p>Bug <a href='https://bugs.eclipse.org/356521'>356521</a>. Deadlock occuring due to ModuleStructuralModel.checkSync() in 3.0.5 P</p>
 </body>
 </html>
\ No newline at end of file
diff --git a/features/org.eclipse.wst.common_core.feature.patch/feature.properties b/features/org.eclipse.wst.common_core.feature.patch/feature.properties
index 019d421..59afcea 100644
--- a/features/org.eclipse.wst.common_core.feature.patch/feature.properties
+++ b/features/org.eclipse.wst.common_core.feature.patch/feature.properties
@@ -60,6 +60,7 @@
 Bug https://bugs.eclipse.org/329997 JSP Syntax Validators show error markers even when the build based markers are turned off.\n\
 Bug https://bugs.eclipse.org/351599 ConcurrentModificationException on faceted project creation.\n\
 Bug https://bugs.eclipse.org/277428 Validation preferences not imported correctly\n\
+Bug https://bugs.eclipse.org/356521 Deadlock occuring due to ModuleStructuralModel.checkSync() in 3.0.5 P\n\
 \n\
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
diff --git a/plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF b/plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF
index c1a8d11..ce34454 100644
--- a/plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.wst.common.modulecore/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-Name: %Bundle-Name.0
 Bundle-Vendor: %provider
 Bundle-SymbolicName: org.eclipse.wst.common.modulecore; singleton:=true
-Bundle-Version: 1.1.211.qualifier
+Bundle-Version: 1.1.212.qualifier
 Bundle-Activator: org.eclipse.wst.common.componentcore.internal.ModulecorePlugin
 Bundle-Localization: plugin
 Export-Package: org.eclipse.wst.common.componentcore,
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleStructuralModel.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleStructuralModel.java
index 1d7136b..41a8bf4 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleStructuralModel.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/ModuleStructuralModel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -19,10 +19,10 @@
 import java.util.List;
 import java.util.Map;
 
+import org.eclipse.core.internal.resources.Workspace;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRoot;
 import org.eclipse.core.resources.IWorkspaceRunnable;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
@@ -285,16 +285,18 @@
 			if (!compFile.isSynchronized(IResource.DEPTH_ONE)) {
 				File iofile = compFile.getFullPath().toFile();
 				if (iofile.exists() || compFile.exists()) {
-					IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
 					try {
-						// OK wait to get workspace root before refreshing
-						Job.getJobManager().beginRule(root, null);
-						compFile.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+						Workspace workspace = (Workspace)compFile.getWorkspace();
+						if (workspace.getElementTree().isImmutable())
+						{
+							workspace.newWorkingTree();
+						}
+						
+						((org.eclipse.core.internal.resources.Resource)compFile).getLocalManager().refresh(compFile.getProject(),
+								IResource.DEPTH_INFINITE, true, null);
 					} catch (CoreException ce) {
 						// ignore
-					} finally {
-						Job.getJobManager().endRule(root);
-					}
+					}					
 				}
 			}
 			synchronized (needsSync) {