Skip to content
Snippets Groups Projects
Commit bb84e64b authored by gmantele's avatar gmantele
Browse files

[TAP] Forbid query execution also in asynchronous mode IF the service is declared as not available.

parent 7613f228
No related branches found
No related tags found
No related merge requests found
......@@ -71,7 +71,7 @@ import uws.service.log.UWSLog.LogLevel;
* </ul>
*
* @author Gr&eacute;gory Mantelet (CDS;ARI)
* @version 2.0 (09/2014)
* @version 2.0 (12/2014)
*
* @see UWSService
*/
......@@ -181,7 +181,14 @@ public class ASync implements TAPResource {
@Override
public boolean executeResource(final HttpServletRequest request, final HttpServletResponse response) throws IOException, TAPException{
try{
// Ensure the service is currently available:
if (!service.isAvailable())
throw new TAPException("Can not execute a query: this TAP service is not available! " + service.getAvailability(), UWSException.SERVICE_UNAVAILABLE);
// Forward the request to the UWS service:
return uws.executeRequest(request, response);
}catch(UWSException ue){
throw new TAPException(ue);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment