Changeset 25648
- Timestamp:
- 2012-05-23T16:44:28+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2Construct.java
r25635 r25648 168 168 waitUntilReady(request); 169 169 Element buildResponse = processBuildCollection(request); 170 if (buildResponse.getElementsByTagName(GSXML.ERROR_ELEM).getLength() > 0)170 if (buildResponse.getElementsByTagName(GSXML.ERROR_ELEM).getLength() > 0) 171 171 { 172 172 return buildResponse; 173 173 } 174 174 175 175 Element statusElem = (Element) buildResponse.getElementsByTagName(GSXML.STATUS_ELEM).item(0); 176 176 String id = statusElem.getAttribute("pid"); … … 755 755 return null; 756 756 } 757 757 758 758 protected void waitUntilReady(Element request) 759 759 { … … 763 763 String collection = (String)params.get(COL_PARAM); 764 764 765 if (checkCollectionIsNotBusy(collection))765 if (checkCollectionIsNotBusy(collection)) 766 766 { 767 767 return; 768 768 } 769 769 770 while (collectionOperationMap.get(collection) != null)770 while (collectionOperationMap.get(collection) != null) 771 771 { 772 772 try … … 774 774 Thread.currentThread().sleep(1000); 775 775 } 776 catch (Exception ex)776 catch (Exception ex) 777 777 { 778 778 ex.printStackTrace(); … … 780 780 } 781 781 } 782 782 783 783 protected void signalReady(Element request) 784 784 { … … 790 790 collectionOperationMap.remove(collection); 791 791 } 792 792 793 793 protected synchronized boolean checkCollectionIsNotBusy(String collection) 794 794 { 795 if (collectionOperationMap.get(collection) == null)795 if (collectionOperationMap.get(collection) == null) 796 796 { 797 797 collectionOperationMap.put(collection, true);
Note:
See TracChangeset
for help on using the changeset viewer.