- Timestamp:
- 2015-06-05T20:58:20+12:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2Construct.java
r29869 r29947 330 330 String lang = request.getAttribute(GSXML.LANG_ATT); 331 331 332 Element response = runCommand(request, GS2PerlConstructor.ACTIVATE); 332 UserContext userContext = new UserContext(request); 333 String request_type = request.getAttribute(GSXML.TYPE_ATT); 334 335 // now we de-activate the collection before running activate.pl, and then re-activate at end 336 // So activate.pl only does the moving, no activation. This way will prevent java from launching 337 // perl, exiting and then leaving dangling file handles (on index/text/col.gdb) in perl. 338 if (!request_type.equals(GSXML.REQUEST_TYPE_STATUS)) { 339 systemRequest("delete", coll_name, null, userContext); // deactivate collection 340 } 341 342 Element response = runCommand(request, GS2PerlConstructor.ACTIVATE); // if request is for STATUS, then this won't run activate.pl 343 333 344 Element status = (Element) GSXML.getChildByTagName(response, GSXML.STATUS_ELEM); 334 335 String request_type = request.getAttribute(GSXML.TYPE_ATT);336 if (request_type.equals(GSXML.REQUEST_TYPE_STATUS))337 {338 return response;339 }340 341 UserContext userContext = new UserContext(request);342 systemRequest("delete", coll_name, null, userContext);343 345 344 346 // check for finished … … 384 386 status.appendChild(t); 385 387 // once have got here, we assume 386 // the first bit proceeded successfully, now reload the collection 388 // the first bit proceeded successfully, now reload the collection (sends a collection reactivation request) 387 389 systemRequest("reload", coll_name, status, userContext); // this will append more messages to the status, and overwrite the error code att 388 390 return response;
Note:
See TracChangeset
for help on using the changeset viewer.